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:
authorJulian Eisel <julian@blender.org>2022-05-11 14:16:54 +0300
committerJulian Eisel <julian@blender.org>2022-05-11 14:18:45 +0300
commit6bd270f3af7dff3cd3223966b65a9f73a492df1d (patch)
tree831b085f0984fdf16adc24f6bd6720ff8e5e7c9d
parent8c233cfd78923c4c070938a16557ff5da1fb6180 (diff)
Fix "Open Clip" operator in Clip Editor broken
Steps to reproduce were: - Open Clip Editor - Call "Open Clip" (e.g. Alt+O) - Select video file The file wouldn't be loaded into the Clip Editor. Caused by 7849b56c3c41.
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 58d7a55eddc..5776184aec0 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -4093,7 +4093,11 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op)
/* Close any popups, like when opening a file browser from the splash. */
UI_popup_handlers_remove_all(C, &root_win->modalhandlers);
- CTX_wm_window_set(C, root_win);
+ /* Setting the context window unsets the context area & screen. Avoid doing that, so operators
+ * calling the file browser can operate in the context the browser was opened in. */
+ if (ctx_win != root_win) {
+ CTX_wm_window_set(C, root_win);
+ }
/* The root window may already have a File Browser open. Cancel it if so, only 1 should be open
* per window. The root context of this operation is also used for the new operation. */
@@ -4148,7 +4152,9 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op)
WM_event_fileselect_event(wm, op, EVT_FILESELECT_FULL_OPEN);
- CTX_wm_window_set(C, ctx_win);
+ if (ctx_win != root_win) {
+ CTX_wm_window_set(C, ctx_win);
+ }
}
/** \} */