fixes unboundlocalerror

This commit is contained in:
onyx-and-iris 2023-09-27 13:36:48 +01:00
parent 0aeb33608f
commit eab4b1c6a9

View File

@ -452,12 +452,12 @@ class NVDAVMWindow(psg.Window):
case "tab||Settings":
self.write_event_value("ADVANCED SETTINGS", None)
case "tab||Physical Strip":
if self.kind.name != "potato":
continue
if values["tabgroup||Physical Strip"] == "tab||Physical Strip||sliders":
if focus := self.find_element_with_focus():
identifier, partial = focus.key.split("||")
_, index = identifier.split()
match self.kind.name:
case "potato":
if "SLIDER COMP" in partial:
self.popup.compressor(int(index), title="Advanced Compressor")
elif "SLIDER GATE" in partial:
@ -964,6 +964,7 @@ class NVDAVMWindow(psg.Window):
self.vm.strip[int(index)].gain = 0
self[f"STRIP {index}||SLIDER {param}"].update(value=0)
case "COMP" | "GATE" | "DENOISER":
target = getattr(self.vm.strip[int(index)], param.lower())
setattr(target, "knob", 0)
self[f"STRIP {index}||SLIDER {param}"].update(value=0)
case "AUDIBILITY":