@@ -136,21 +136,8 @@ class SettingConfigSection(ConfigSection):
136136    PROFILES_KEY  =  'user_profiles' 
137137    SETTINGS_KEY  =  'user_profile_settings' 
138138
139-     # Set containing settings that can impact the result of file renaming (path or filename) 
140-     FILE_NAMING_SETTINGS  =  {
141-         'enabled_plugins' ,
142-         'move_files' ,
143-         'move_files_to' ,
144-         'rename_files' ,
145-         'standardize_artists' ,
146-         'va_name' ,
147-         'windows_compatibility' ,
148-         'selected_file_naming_script_id' ,
149-         'file_naming_scripts' ,
150-         'user_profiles' ,
151-         'user_profile_settings' ,
152-     }
153-     naming_settings_changed_signal  =  QtCore .pyqtSignal (str )
139+     # Signal emitted when the value of a setting has changed. 
140+     setting_changed_signal  =  QtCore .pyqtSignal (str )
154141
155142    @classmethod  
156143    def  init_profile_options (cls ):
@@ -206,21 +193,20 @@ def __getitem__(self, name):
206193        return  self .value (name , opt , opt .default )
207194
208195    def  __setitem__ (self , name , value ):
196+         old_value  =  self .__getitem__ (name )
209197        # Don't process settings that are not profile-specific 
210198        if  name  in  profile_groups_all_settings ():
211199            for  profile_id , settings  in  self ._get_active_profile_settings ():
212200                if  name  in  settings :
213201                    self ._save_profile_setting (profile_id , name , value )
214-                     self ._send_file_naming_signal (name )
202+                     if  value  !=  old_value :
203+                         self .setting_changed_signal .emit (name )
215204                    return 
216205        key  =  self .key (name )
217206        self .__qt_config .setValue (key , value )
218207        self ._memoization [key ].dirty  =  True 
219-         self ._send_file_naming_signal (name )
220- 
221-     def  _send_file_naming_signal (self , name : str ):
222-         if  name  in  self .FILE_NAMING_SETTINGS :
223-             self .naming_settings_changed_signal .emit (name )
208+         if  value  !=  old_value :
209+             self .setting_changed_signal .emit (name )
224210
225211    def  _save_profile_setting (self , profile_id , name , value ):
226212        profile_settings  =  self .__qt_config .profiles [self .SETTINGS_KEY ]
0 commit comments