Skip to content

Commit

Permalink
fixes unboundlocalerror
Browse files Browse the repository at this point in the history
  • Loading branch information
onyx-and-iris committed Sep 27, 2023
1 parent 0aeb336 commit eab4b1c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/nvda_voicemeeter/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,16 @@ def run(self):
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()
if "SLIDER COMP" in partial:
self.popup.compressor(int(index), title="Advanced Compressor")
elif "SLIDER GATE" in partial:
self.popup.gate(int(index), title="Advanced Gate")
match self.kind.name:
case "potato":
if "SLIDER COMP" in partial:
self.popup.compressor(int(index), title="Advanced Compressor")
elif "SLIDER GATE" in partial:
self.popup.gate(int(index), title="Advanced Gate")

# Menus
case [["Restart", "Audio", "Engine"], ["MENU"]]:
Expand Down Expand Up @@ -964,6 +964,7 @@ def run(self):
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":
Expand Down

0 comments on commit eab4b1c

Please sign in to comment.