diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-01 09:09:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-01 09:11:37 +0300 |
commit | c74626c54fadc55c9291b12c8c354a3a978eb286 (patch) | |
tree | e764499eb5e745fd0696a3c85ae2e4eb6df1874e | |
parent | 6f61b6aa445b5a93b7bd8f156b0d0804c6b1d2d6 (diff) |
Fix keymap editing not tagging dirty
Partial fix for T65629
-rw-r--r-- | release/scripts/startup/bl_operators/userpref.py | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py index 706afc6dcf8..152dab23dcf 100644 --- a/release/scripts/startup/bl_operators/userpref.py +++ b/release/scripts/startup/bl_operators/userpref.py @@ -286,6 +286,7 @@ class PREFERENCES_OT_keymap_restore(Operator): km = context.keymap km.restore_to_default() + context.preferences.is_dirty = True return {'FINISHED'} @@ -333,6 +334,7 @@ class PREFERENCES_OT_keyitem_add(Operator): km.show_expanded_items = True km.show_expanded_children = True + context.preferences.is_dirty = True return {'FINISHED'} @@ -354,6 +356,8 @@ class PREFERENCES_OT_keyitem_remove(Operator): km = context.keymap kmi = km.keymap_items.from_id(self.item_id) km.keymap_items.remove(kmi) + + context.preferences.is_dirty = True return {'FINISHED'} diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index bfdb55800a2..8a9b8a14563 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5808,8 +5808,8 @@ void RNA_def_userdef(BlenderRNA *brna) prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "runtime.is_dirty", 0); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Dirty", "Preferences have changed"); + RNA_def_property_update(prop, 0, "rna_userdef_ui_update"); rna_def_userdef_view(brna); rna_def_userdef_edit(brna); |