[Bf-blender-cvs] [d6cd7d1138b] master: WM: correct the return flag from wm_handler_fileselect_do
Campbell Barton
noreply at git.blender.org
Sun Feb 5 11:52:46 CET 2023
Commit: d6cd7d1138bbddfe9a9d8e39295163023ac861a4
Author: Campbell Barton
Date: Sun Feb 5 21:03:19 2023 +1100
Branches: master
https://developer.blender.org/rBd6cd7d1138bbddfe9a9d8e39295163023ac861a4
WM: correct the return flag from wm_handler_fileselect_do
In the unlikely case an area could not be created OPERATOR_CANCELLED
was returned, this has the same value of WM_HANDLER_HANDLED however
break is logical in this situation and both flags work.
===================================================================
M source/blender/windowmanager/intern/wm_event_system.cc
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc
index c1ee3d522b6..1bfcfa3da32 100644
--- a/source/blender/windowmanager/intern/wm_event_system.cc
+++ b/source/blender/windowmanager/intern/wm_event_system.cc
@@ -2643,7 +2643,7 @@ static int wm_handler_fileselect_do(bContext *C,
}
else {
BKE_report(&wm->reports, RPT_ERROR, "Failed to open window!");
- return OPERATOR_CANCELLED;
+ return WM_HANDLER_BREAK;
}
action = WM_HANDLER_BREAK;
More information about the Bf-blender-cvs
mailing list