fixes regressoin in event bindings

This commit is contained in:
onyx-and-iris 2023-08-26 17:29:24 +01:00
parent 4ebab80a19
commit 84e349f943
2 changed files with 5 additions and 4 deletions

View File

@ -35,9 +35,9 @@ class Builder:
for step in steps: for step in steps:
layout2.append([step()]) layout2.append([step()])
tab1 = psg.Tab("settings", layout0, key="settings") tab1 = psg.Tab("Settings", layout0, key="settings")
tab2 = psg.Tab("physical strips", layout1, key="physical strip") tab2 = psg.Tab("Physical Strips", layout1, key="physical strip")
tab3 = psg.Tab("virtual strips", layout2, key="virtual strip") tab3 = psg.Tab("Virtual Strips", layout2, key="virtual strip")
tab_group = psg.TabGroup([[tab1, tab2, tab3]], change_submits=True, key="tabs") tab_group = psg.TabGroup([[tab1, tab2, tab3]], change_submits=True, key="tabs")
return [[tab_group]] return [[tab_group]]

View File

@ -65,7 +65,7 @@ class NVDAVMWindow(psg.Window):
# Patch Insert # Patch Insert
if self.kind.name != "basic": if self.kind.name != "basic":
for i in range(self.kind.num_strip): for i in range(self.kind.num_strip):
if i <= self.kind.phys_in: if i < self.kind.phys_in:
self[f"INSERT CHECKBOX||IN{i + 1} 0"].bind("<FocusIn>", "||FOCUS IN") self[f"INSERT CHECKBOX||IN{i + 1} 0"].bind("<FocusIn>", "||FOCUS IN")
self[f"INSERT CHECKBOX||IN{i + 1} 1"].bind("<FocusIn>", "||FOCUS IN") self[f"INSERT CHECKBOX||IN{i + 1} 1"].bind("<FocusIn>", "||FOCUS IN")
else: else:
@ -174,6 +174,7 @@ class NVDAVMWindow(psg.Window):
val = not self.cache["outputs"][f"STRIP {index}||{output}"] val = not self.cache["outputs"][f"STRIP {index}||{output}"]
setattr(self.vm.strip[int(index)], output, val) setattr(self.vm.strip[int(index)], output, val)
self.cache["outputs"][f"STRIP {index}||{output}"] = val self.cache["outputs"][f"STRIP {index}||{output}"] = val
self.nvda.speak(f"STRIP {index} {output} {label if label else ''} {'on' if val else 'off'}")
case [["STRIP", index], [output], ["FOCUS", "IN"]]: case [["STRIP", index], [output], ["FOCUS", "IN"]]:
val = self.cache["outputs"][f"STRIP {index}||{output}"] val = self.cache["outputs"][f"STRIP {index}||{output}"]
label = self.vm.strip[int(index)].label label = self.vm.strip[int(index)].label