diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 0aaa3088142..5aa2f6c1c50 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -981,25 +981,21 @@ static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData) return block; } +/* operator menu needs undo, for redo callback */ int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - int retval= OPERATOR_CANCELLED; if((op->type->flag & OPTYPE_REGISTER)==0) { BKE_reportf(op->reports, RPT_ERROR, "Operator '%s' does not have register enabled, incorrect invoke function.", op->type->idname); return OPERATOR_CANCELLED; } - if(op->type->exec) { - retval= op->type->exec(C, op); + ED_undo_push_op(C, op); + wm_operator_register(C, op); - /* ED_undo_push_op(C, op), called by wm_operator_finished now. */ - } - - if(retval != OPERATOR_CANCELLED) - uiPupBlock(C, wm_block_create_redo, op); + uiPupBlock(C, wm_block_create_redo, op); - return retval; + return OPERATOR_RUNNING_MODAL; } int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, int height) |