Better fix for "To Sphere" crashing in Image editor. It appeared to be in use for

mask/uv modes.
This commit is contained in:
Ton Roosendaal 2013-03-26 10:28:19 +00:00
parent f1ed223e34
commit 6e076c4164
3 changed files with 3 additions and 3 deletions

@ -6469,7 +6469,7 @@ void createTransData(bContext *C, TransInfo *t)
sort_trans_data_dist(t);
}
}
else {
else if (t->obedit) {
createTransUVs(C, t);
if (t->data && (t->flag & T_PROP_EDIT)) {
sort_trans_data(t); // makes selected become first in array

@ -1160,7 +1160,7 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
t->options |= CTX_MASK;
}
else {
BLI_assert(0);
/* image not in uv edit, nor in mask mode, can happen for some tools */
}
}
else if (t->spacetype == SPACE_NODE) {

@ -721,7 +721,7 @@ static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
ot->exec = transform_exec;
ot->modal = transform_modal;
ot->cancel = transform_cancel;
ot->poll = ED_operator_view3d_active;
ot->poll = ED_operator_screenactive;
RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);