Commit: f6ff8f27e35d7b9596bbb2c55c3cf464f6e6ffc0
Author: Campbell Barton
Date:   Wed Jan 27 17:33:35 2016 +1100
Branches: master
https://developer.blender.org/rBf6ff8f27e35d7b9596bbb2c55c3cf464f6e6ffc0

WM: Support showing reports for modal operators

This isn't common use, but modal operators may make reports while they're 
running.
Now they're displayed in the info header.

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

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 3ff7ef1..84d6f7e 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1691,8 +1691,15 @@ static int wm_handler_operator_call(bContext *C, 
ListBase *handlers, wmEventHand
                                if (ot->flag & OPTYPE_UNDO)
                                        wm->op_undo_depth--;
 
-                               if (retval & (OPERATOR_CANCELLED | 
OPERATOR_FINISHED))
+                               if (retval & (OPERATOR_CANCELLED | 
OPERATOR_FINISHED)) {
                                        wm_operator_reports(C, op, retval, 
false);
+                               }
+                               else {
+                                       /* not very common, but modal operators 
may report before finishing */
+                                       if 
(!BLI_listbase_is_empty(&op->reports->list)) {
+                                               wm_add_reports(op->reports);
+                                       }
+                               }
 
                                /* important to run 'wm_operator_finished' 
before NULLing the context members */
                                if (retval & OPERATOR_FINISHED) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to