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>2010-11-10 14:19:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-10 14:19:52 +0300
commitfe18f517a106f6f31acb7ded67efe6e0f6140637 (patch)
treee95e100463d26bb3a0e22e1a3235504bf8956a07 /source/blender/windowmanager/intern/wm_keymap.c
parentbb3cd048872cc1056f4b2bfeaa9ebd2c69c46285 (diff)
bugfix [#24635] "Add Shortcut"
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 436494be975..5da9bb46cfd 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -63,13 +63,14 @@ static void keymap_properties_set(wmKeyMapItem *kmi)
WM_operator_properties_sanitize(kmi->ptr, 1);
}
-void WM_keymap_properties_reset(wmKeyMapItem *kmi)
+/* properties can be NULL, otherwise the arg passed is used and ownership is given to the kmi */
+void WM_keymap_properties_reset(wmKeyMapItem *kmi, struct IDProperty *properties)
{
WM_operator_properties_free(kmi->ptr);
MEM_freeN(kmi->ptr);
kmi->ptr = NULL;
- kmi->properties = NULL;
+ kmi->properties = properties;
keymap_properties_set(kmi);
}
@@ -706,7 +707,7 @@ void WM_keymap_restore_item_to_default(bContext *C, wmKeyMap *keymap, wmKeyMapIt
if(strcmp(orig->idname, kmi->idname) != 0) {
BLI_strncpy(kmi->idname, orig->idname, sizeof(kmi->idname));
- WM_keymap_properties_reset(kmi);
+ WM_keymap_properties_reset(kmi, NULL);
}
if (orig->properties) {