[Bf-blender-cvs] [1a4595618c9] blender2.8: Fix factory-settings using stale preferences
Campbell Barton
noreply at git.blender.org
Thu Nov 22 01:08:02 CET 2018
Commit: 1a4595618c959da17ddec9cef839f8bf654f4727
Author: Campbell Barton
Date: Thu Nov 22 10:51:27 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB1a4595618c959da17ddec9cef839f8bf654f4727
Fix factory-settings using stale preferences
We need to reload defaults on factory startup because the defaults
now have preferences that may have changed.
===================================================================
M source/blender/windowmanager/intern/wm_files.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 318147e8c25..6c86a67931b 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -956,6 +956,17 @@ int wm_homefile_read(
/* match the read WM with current WM */
wm_window_match_do(C, &wmbase, &bmain->wm, &bmain->wm);
+
+ if (use_factory_settings) {
+ /* Clear keymaps because the current default keymap may have been initialized from user preferences,
+ * which have been reset. */
+ for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
+ if (wm->defaultconf) {
+ wm->defaultconf->flag &= ~KEYCONF_INIT_DEFAULT;
+ }
+ }
+ }
+
WM_check(C); /* opens window(s), checks keymaps */
bmain->name[0] = '\0';
More information about the Bf-blender-cvs
mailing list