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>2019-02-02 06:01:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-02 06:01:48 +0300
commitd46c910b1a105287bccccd651056a9a0a73b3936 (patch)
tree1058930380845d6c6008eab3f639529a405cc8d3 /source/blender/windowmanager
parentafcbf7cf1357723f59eca8e118a0ca9ef6cf6555 (diff)
Cleanup: match logic for merging G.f & G.fileflags on load
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 3a5def1df28..224a4cd597e 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -586,7 +586,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
/* we didn't succeed, now try to read Blender file */
if (retval == BKE_READ_EXOTIC_OK_BLEND) {
- int G_f = G.f;
+ const int G_f_orig = G.f;
ListBase wmbase;
/* put aside screens to match with persistent windows later */
@@ -614,9 +614,9 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
/* this flag is initialized by the operator but overwritten on read.
* need to re-enable it here else drivers + registered scripts wont work. */
- if (G.f != G_f) {
- const int flags_keep = (G_FLAG_SCRIPT_AUTOEXEC | G_FLAG_SCRIPT_OVERRIDE_PREF);
- G.f = (G.f & ~flags_keep) | (G_f & flags_keep);
+ if (G.f != G_f_orig) {
+ const int flags_keep = G_FLAG_ALL_RUNTIME;
+ G.f = (G.f & ~flags_keep) | (G_f_orig & flags_keep);
}
/* match the read WM with current WM */