Fix missing preference dirty tagging

Tagging dirty was failing for UI scale, line width, hinting & others.

Checking for an update function means all update functions
need to tag preferences as dirty.

Since this check was added to prevent the active section marking the
preferences as dirty, only exclude this property.
This commit is contained in:
Campbell Barton
2019-05-14 10:08:24 +10:00
parent 36a33b8c82
commit a5b5bd2c24

View File

@@ -7574,10 +7574,16 @@ static void button_activate_exit(
ui_popup_menu_memory_set(block, but);
}
/* Not very elegant, but ensures preference changes force re-save. */
if (but->rnaprop && (but->rnapoin.data == &U) && !RNA_property_update_check(but->rnaprop)) {
U.runtime.is_dirty = true;
WM_main_add_notifier(NC_WINDOW, NULL);
if (U.runtime.is_dirty == false) {
/* Not very elegant, but ensures preference changes force re-save. */
if (but->rnaprop && (but->rnapoin.data == &U)) {
/* Exclude navigation from setting dirty. */
extern PropertyRNA rna_Preferences_active_section;
if (!ELEM(but->rnaprop, &rna_Preferences_active_section)) {
U.runtime.is_dirty = true;
WM_main_add_notifier(NC_WINDOW, NULL);
}
}
}
}