UI: Do not save unchanged settings to settings.yaml
This commit is contained in:
parent
038b4fc8af
commit
53dc1d8197
2 changed files with 7 additions and 0 deletions
|
@ -234,6 +234,11 @@ def save_settings(state, preset, extensions_list, show_controls, theme_state):
|
|||
_id = f"{extension_name}-{param}"
|
||||
output[_id] = params[param]
|
||||
|
||||
# Do not save unchanged settings
|
||||
for key in list(output.keys()):
|
||||
if key in shared.default_settings and output[key] == shared.default_settings[key]:
|
||||
output.pop(key)
|
||||
|
||||
return yaml.dump(output, sort_keys=False, width=float("inf"))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue