[Bf-blender-cvs] [a1480568416] master: UI: Show suffix '*' instead of graying out 'Save Preferences'

Campbell Barton noreply at git.blender.org
Fri Aug 9 16:10:48 CEST 2019


Commit: a14805684163c9e93cae56d46aebb9d70b16158b
Author: Campbell Barton
Date:   Sat Aug 10 00:06:54 2019 +1000
Branches: master
https://developer.blender.org/rBa14805684163c9e93cae56d46aebb9d70b16158b

UI: Show suffix '*' instead of graying out 'Save Preferences'

Save preferences still works when preferences have not been edited.

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

M	release/scripts/startup/bl_ui/space_userpref.py

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

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 48aaf55bdfa..128d6100a27 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -44,9 +44,11 @@ class USERPREF_HT_header(Header):
         if prefs.use_preferences_save and (not bpy.app.use_userpref_skip_save_on_exit):
             pass
         else:
-            sub = row.row(align=True)
-            sub.active = prefs.is_dirty
-            sub.operator("wm.save_userpref")
+            # Show '*' to let users know the preferences have been modified.
+            row.operator(
+                "wm.save_userpref",
+                text="Save Preferences{:s}".format(" *" if prefs.is_dirty else ""),
+            )
 
     def draw(self, context):
         layout = self.layout



More information about the Bf-blender-cvs mailing list