Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-27 20:02:15 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-27 20:02:15 +0400
commitb43c022373a58b5d7214c526e2b474f01b40d692 (patch)
tree9313b747d91080ca84ac74ee4617b918b456bedb /source/blender/windowmanager
parent5f8fded63943fd593f81203956968b97ec27c52c (diff)
Move to layer: remove the OK button and make it apply immediately like it did
before, is much nicer workflow. Now only if global undo is disabled will the OK button show. This is also a more generic fix for #26891 that solves other operators that were also broken with global undo disabled.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 027c883c01f..c64cb339445 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1207,13 +1207,17 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
* \note operator menu needs undo flag enabled , for redo callback */
static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_call)
{
-
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 we don't have global undo, we can't do undo push for automatic redo,
+ * so we require manual OK clicking in this popup */
+ if(!(U.uiflag & USER_GLOBALUNDO))
+ return WM_operator_props_dialog_popup(C, op, 300, UI_UNIT_Y);
+
ED_undo_push_op(C, op);
wm_operator_register(C, op);