diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-19 05:07:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-19 05:11:33 +0300 |
commit | 472b1147610088de233948fcbd7ac4d992da3e36 (patch) | |
tree | 5c3b1924b2207e738a81759461ced10a4bd41500 /source/blender/windowmanager/intern/wm.c | |
parent | 3d92afca7eb1f9c99fa0616dfbb6c264e7002f80 (diff) |
Fix keymap loading multiple times
Blender defaults data-file was loading it's own key-map
with a capital 'B', the preset would load it again w/ a lowercase name.
Use lowercase key-map names.
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 29a1252cf4b..06ae1e498b7 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -239,12 +239,16 @@ void WM_keyconfig_init(bContext *C) wmWindowManager *wm = CTX_wm_manager(C); /* create standard key configs */ - if (!wm->defaultconf) - wm->defaultconf = WM_keyconfig_new(wm, "Blender", false); - if (!wm->addonconf) - wm->addonconf = WM_keyconfig_new(wm, "Blender Addon", false); - if (!wm->userconf) - wm->userconf = WM_keyconfig_new(wm, "Blender User", false); + if (wm->defaultconf == NULL) { + /* Keep lowercase to match the preset filename. */ + wm->defaultconf = WM_keyconfig_new(wm, "blender", false); + } + if (wm->addonconf == NULL) { + wm->addonconf = WM_keyconfig_new(wm, "blender addon", false); + } + if (wm->userconf == NULL) { + wm->userconf = WM_keyconfig_new(wm, "blender user", false); + } /* initialize only after python init is done, for keymaps that * use python operators */ |