diff options
author | Ton Roosendaal <ton@blender.org> | 2010-11-20 20:31:59 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-11-20 20:31:59 +0300 |
commit | 4f3d80e70608a1d308e96cd278ba619edb569e31 (patch) | |
tree | 0550487af8f0684cae73aea3ce98f3405362595f /source/blender/editors | |
parent | 03e943be527e7d898b4b85b7709f1b5aa852b8a0 (diff) |
Bugfix #21028
- Image Editor, "New", gave for each tweak in redo menu a new Image
when Object is in Editmode. This is a limitation of our current
undo system. Marked this issue in the wiki todo.
Solved by adding a poll in operator that prevents this to be called.
(a bit annoying, but the error is worse!)
- On assigning a new image texture to faces in Editmode, no redraw
happened in 3D window. Added notifier for it.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index ea6579f3429..21db6372028 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1301,6 +1301,18 @@ static int new_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +/* XXX is temp, redo is not possible in editmode due to undo conflicts */ +static int space_image_no_editmode_poll(bContext *C) +{ + SpaceImage *sima= CTX_wm_space_image(C); + Object *ob= CTX_data_edit_object(C); + + if(sima && ob) + return 0; + + return 1; +} + void IMAGE_OT_new(wmOperatorType *ot) { PropertyRNA *prop; @@ -1313,7 +1325,8 @@ void IMAGE_OT_new(wmOperatorType *ot) /* api callbacks */ ot->exec= new_exec; ot->invoke= WM_operator_props_popup; - + ot->poll= space_image_no_editmode_poll; + /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; |