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:
authorCampbell Barton <ideasman42@gmail.com>2021-11-02 14:06:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-02 14:06:35 +0300
commit7a4ee2fd4feeab25c9a5c4ffba74e204f539f77f (patch)
treef323a9aa3e27a2b6c98bdf2505a50fe6541dda19 /source/blender/windowmanager
parent52f4a908f7117a3e2a0d5b3de78c6c72f2a599e5 (diff)
parent9bd97e62ade417f6b4025acbad46802c3e7e5683 (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 67222cc07f9..ff9b56d7859 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -769,6 +769,18 @@ static void wm_file_read_post(bContext *C, const struct wmFileReadPost_Params *p
WM_toolsystem_init(C);
}
}
+
+ /* Keep last. */
+ if (use_data) {
+ if (!G.background) {
+ /* Special case, when calling indirectly (from a Python script for example),
+ * the event loop wont run again to set the active window.
+ * Set the window here to allow scripts to continue running other operations, see: T92464. */
+ if (wm->op_undo_depth > 0) {
+ CTX_wm_window_set(C, wm->windows.first);
+ }
+ }
+ }
}
/** \} */