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';

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to