mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-04-23 15:59:04 +00:00
fix: copy state dict on change
This commit is contained in:
@@ -59,6 +59,9 @@ def suffix(n: int, c: str = " ") -> str:
|
||||
|
||||
|
||||
def on_widget_change(state: dict, value: Any, *, attr: str):
|
||||
if "is_api" in state:
|
||||
state = state.copy()
|
||||
state.pop("is_api")
|
||||
state[attr] = value
|
||||
return state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user