GraphicEQControl: only re-render the written slider on write completion
The partial-dict hardening ind632febfmade set_value call control.set_value() for every band unconditionally. A per-slider write returns a single-key result dict, so completing one write re-rendered all 10 sliders from setting._value. Any slider the user had dragged but whose 0.5s debounce hadn't fired yet got reverted to its old value — and the subsequent debounce then read that reverted value and dropped the user's change. Restore the original behavior: only set sliders present in the result dict; for the rest, read stored.get() for the tooltip but leave the widget alone. Keeps the KeyError-safe .get() fromd632febf.
This commit is contained in:
parent
5853cf5a8e
commit
d800fc4c54
|
|
@ -611,9 +611,10 @@ class GraphicEQControl(MultipleControl):
|
|||
for vbox in self._items:
|
||||
item = vbox._setting_item
|
||||
v = value.get(int(item))
|
||||
if v is None:
|
||||
if v is not None:
|
||||
vbox.control.set_value(v)
|
||||
else:
|
||||
v = stored.get(int(item), 0)
|
||||
vbox.control.set_value(v)
|
||||
b += f"{str(item)}: ({str(v)}) "
|
||||
lbl_text = ngettext("%d value", "%d values", n) % n
|
||||
self._button.set_label(lbl_text)
|
||||
|
|
|
|||
Loading…
Reference in New Issue