diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-15 14:03:17 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-15 14:03:17 +0400 |
commit | 270ed82c7b1a6e10f80e00ede354dd16b3dd635d (patch) | |
tree | a7c28dbb525e450818371548883d95a2790edd9c | |
parent | 551e8bc72c1a0be6fbc32153952036e3fc83560f (diff) |
Fix #28202: deactivating keymap items not saving properly.
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 307cf0e175a..93adf808f83 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1746,6 +1746,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE); RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item"); RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1); + RNA_def_property_update(prop, 0, "rna_KeyMapItem_update"); prop= RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_USER_MODIFIED); diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 2dfe4d8ccdc..6887aa4c717 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -106,6 +106,9 @@ static int wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b) (a->ptr && b->ptr && IDP_EqualsProperties(a->ptr->data, b->ptr->data)))) return 0; + if((a->flag & KMI_INACTIVE) != (b->flag & KMI_INACTIVE)) + return 0; + return (a->propvalue == b->propvalue); } |