bugfix [#24635] "Add Shortcut"
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -617,6 +617,7 @@ void WM_operator_properties_free(PointerRNA *ptr)
|
||||
if(properties) {
|
||||
IDP_FreeProperty(properties);
|
||||
MEM_freeN(properties);
|
||||
ptr->data= NULL; /* just incase */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user