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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-03-26 12:11:11 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-03-27 11:41:33 +0300
commit6eb1004d50b8b80c67fd867efae8c3a66f5f0cec (patch)
tree22e9fb998a579caf9b61724ea9861389ac4fc43f /source/blender
parent3b59c111821b8002020ee76edf25258d7c38b381 (diff)
Fix T58439: Info Editor does not show operator reports immediately when
operator cancelled. Lots of operators return OPERATOR_CANCELLED when no data really changed. Reports from those operators do not show immediately in the Info Editor [they only do if the operator returns OPERATOR_FINISHED]. Now also notify the Info Editor in case of OPERATOR_CANCELLED. Maniphest Tasks: T58439 Differential Revision: https://developer.blender.org/D7238
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index b61759e6d97..1a794e9bf0b 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -870,6 +870,10 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool ca
}
}
+ /* Refresh Info Editor with reports immediately, even if op returned OPERATOR_CANCELLED. */
+ if ((retval & OPERATOR_CANCELLED) && !BLI_listbase_is_empty(&op->reports->list)) {
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
+ }
/* if the caller owns them, handle this */
wm_add_reports(op->reports);
}