[Bf-blender-cvs] [a5b5bd2c24e] master: Fix missing preference dirty tagging

Campbell Barton noreply at git.blender.org
Tue May 14 02:27:03 CEST 2019


Commit: a5b5bd2c24e06b308346626f3abb7a705d7af70a
Author: Campbell Barton
Date:   Tue May 14 10:08:24 2019 +1000
Branches: master
https://developer.blender.org/rBa5b5bd2c24e06b308346626f3abb7a705d7af70a

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.

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 7edf581d2ee..c5a88c5fadb 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -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);
+        }
+      }
     }
   }



More information about the Bf-blender-cvs mailing list