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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-12 16:53:08 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-13 20:22:07 +0300
commit7aae28af2d7dd9d593c4208d8c73d06d9e274044 (patch)
treeeee275d3771c0c941f2c08576493f6406fee2a22 /source/blender/windowmanager/WM_keymap.h
parentfe4df40f3086d7fc135e17a15e0c4060f6b66dae (diff)
Keymaps: refactor loading of default keymap, fix bugs.
This refactors loading of key configurations to clear and refill existing ones, rather than adding a new one and then removing the old one. This fixes broken loading of non-default configurations after recent changes, and prepares for future changes to make it possible to dynamically change key configurations based on user preferences.
Diffstat (limited to 'source/blender/windowmanager/WM_keymap.h')
-rw-r--r--source/blender/windowmanager/WM_keymap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index b27d6b44ab0..71037ab162e 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -42,9 +42,10 @@ struct EnumPropertyItem;
/* Key Configuration */
-wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, const char *idname);
+wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, const char *idname, bool user_defined);
wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, const char *idname);
bool WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
+void WM_keyconfig_clear (struct wmKeyConfig *keyconf);
void WM_keyconfig_free (struct wmKeyConfig *keyconf);
void WM_keyconfig_set_active(struct wmWindowManager *wm, const char *idname);
@@ -56,7 +57,7 @@ void WM_keyconfig_update_operatortype(void);
/* Keymap */
void WM_keymap_init (struct bContext *C);
-void WM_keymap_free (struct wmKeyMap *keymap);
+void WM_keymap_clear (struct wmKeyMap *keymap);
wmKeyMapItem *WM_keymap_verify_item(
struct wmKeyMap *keymap, const char *idname, int type,