Merge pull request #12854 from catboxanon/fix/quicksettings-dropdown-unfocus

Do not change quicksettings dropdown option when value returned is `None`
This commit is contained in:
AUTOMATIC1111 2023-08-30 07:41:46 +03:00 committed by GitHub
commit 9e248fb24e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ class UiSettings:
if not opts.same_type(value, opts.data_labels[key].default):
return gr.update(visible=True), opts.dumpjson()
if not opts.set(key, value):
if value is None or not opts.set(key, value):
return gr.update(value=getattr(opts, key)), opts.dumpjson()
opts.save(shared.config_filename)