[Bf-blender-cvs] [e2a7e1e4940] master: WM: OP_IS_INVOKE was being incorrectly set

Campbell Barton noreply at git.blender.org
Fri Jul 28 21:51:46 CEST 2017


Commit: e2a7e1e4940109c09de2b0e2fc22029de3636936
Author: Campbell Barton
Date:   Sat Jul 29 05:40:33 2017 +1000
Branches: master
https://developer.blender.org/rBe2a7e1e4940109c09de2b0e2fc22029de3636936

WM: OP_IS_INVOKE was being incorrectly set

Calling an operator with EXEC_* context would still set the invoke flag.

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 32f978ae891..4f68e7cccca 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1089,6 +1089,9 @@ bool WM_operator_last_properties_store(wmOperator *UNUSED(op))
 
 #endif
 
+/**
+ * Also used for exec when 'event' is NULL.
+ */
 static int wm_operator_invoke(
         bContext *C, wmOperatorType *ot, wmEvent *event,
         PointerRNA *properties, ReportList *reports, const bool poll_only)
@@ -1104,7 +1107,9 @@ static int wm_operator_invoke(
 		wmOperator *op = wm_operator_create(wm, ot, properties, reports); /* if reports == NULL, they'll be initialized */
 		const bool is_nested_call = (wm->op_undo_depth != 0);
 		
-		op->flag |= OP_IS_INVOKE;
+		if (event != NULL) {
+			op->flag |= OP_IS_INVOKE;
+		}
 
 		/* initialize setting from previous run */
 		if (!is_nested_call) { /* not called by py script */




More information about the Bf-blender-cvs mailing list