diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-13 11:52:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-13 11:57:05 +0300 |
commit | 8cdf76fad970cf154e029a71de7ab2dff8a68f49 (patch) | |
tree | ca134ea1dc84441716e9273d47172a6fa2c64874 /source/blender/makesrna/intern | |
parent | d2efdaa26cad2e493c44b7e9305db145863b4fae (diff) |
Fix unintended autosaving of preferences in a few cases
* Dirty flag was not cleared on load
* Navigating tabs should not cause save
* Background mode should not autosave (for e.g. render farms and tests)
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 5198d89bda8..1e5d59c1491 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -184,6 +184,13 @@ static void rna_userdef_version_get(PointerRNA *ptr, int *value) value[2] = userdef->subversionfile; } +static void rna_userdef_ui_update(Main *UNUSED(bmain), + Scene *UNUSED(scene), + PointerRNA *UNUSED(ptr)) +{ + WM_main_add_notifier(NC_WINDOW, NULL); +} + static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { /* We can't use 'ptr->data' because this update function @@ -5591,7 +5598,7 @@ void RNA_def_userdef(BlenderRNA *brna) RNA_def_property_enum_items(prop, preference_section_items); RNA_def_property_ui_text( prop, "Active Section", "Active section of the preferences shown in the user interface"); - RNA_def_property_update(prop, 0, "rna_userdef_update"); + RNA_def_property_update(prop, 0, "rna_userdef_ui_update"); /* don't expose this directly via the UI, modify via an operator */ prop = RNA_def_property(srna, "app_template", PROP_STRING, PROP_NONE); |