diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-28 15:38:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-28 15:38:29 +0300 |
commit | 2840d524e05ebfdbce9d5edf569496a5d5ef91c8 (patch) | |
tree | 2250156536bb427082f7e273d14d6d9b8ea79550 /source | |
parent | 34ea1cf0b23977ab76b23b06f6ceb1fda5631f88 (diff) |
fix for fix [#24955] Generating UV-Images within blender (Alt-N) not possible
We had 3 reports of not being able to add images in editmode which was a workaround for redo in editmode bug.
Rather then having it use operator redo, just give an OK button.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 21db6372028..7dae17ff9e0 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1244,7 +1244,7 @@ void IMAGE_OT_reload(wmOperatorType *ot) /********************** new image operator *********************/ -static int new_exec(bContext *C, wmOperator *op) +static int image_new_exec(bContext *C, wmOperator *op) { SpaceImage *sima; Scene *scene; @@ -1301,16 +1301,11 @@ 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) +/* XXX, Ton is not a fan of OK buttons but using this function to avoid undo/redo bug while in mesh-editmode, - campbell */ +static int image_new_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceImage *sima= CTX_wm_space_image(C); - Object *ob= CTX_data_edit_object(C); + return WM_operator_props_dialog_popup(C, op, 300, 100); - if(sima && ob) - return 0; - - return 1; } void IMAGE_OT_new(wmOperatorType *ot) @@ -1323,9 +1318,8 @@ void IMAGE_OT_new(wmOperatorType *ot) ot->idname= "IMAGE_OT_new"; /* api callbacks */ - ot->exec= new_exec; - ot->invoke= WM_operator_props_popup; - ot->poll= space_image_no_editmode_poll; + ot->exec= image_new_exec; + ot->invoke= image_new_invoke; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; |