mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 10:00:46 +00:00
resizes the patch composite buttons
fixes possible (but unlikely) index out of range. patch bump
This commit is contained in:
parent
bdd570738a
commit
421688eff8
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "nvda_voicemeeter"
|
name = "nvda_voicemeeter"
|
||||||
version = "0.5.2"
|
version = "0.5.3"
|
||||||
description = "A Voicemeeter app compatible with NVDA"
|
description = "A Voicemeeter app compatible with NVDA"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "onyx-and-iris", email = "code@onyxandiris.online" },
|
{ name = "onyx-and-iris", email = "code@onyxandiris.online" },
|
||||||
|
@ -202,7 +202,7 @@ class Builder:
|
|||||||
[
|
[
|
||||||
psg.ButtonMenu(
|
psg.ButtonMenu(
|
||||||
f"PC{i + 1}",
|
f"PC{i + 1}",
|
||||||
size=(6, 2),
|
size=(5, 2),
|
||||||
menu_def=["", outputs],
|
menu_def=["", outputs],
|
||||||
key=f"PATCH COMPOSITE||PC{i + 1}",
|
key=f"PATCH COMPOSITE||PC{i + 1}",
|
||||||
)
|
)
|
||||||
|
@ -613,10 +613,12 @@ class NVDAVMWindow(psg.Window):
|
|||||||
else:
|
else:
|
||||||
index = int(key[-1]) - 1
|
index = int(key[-1]) - 1
|
||||||
comp_index = self.vm.patch.composite[index].get()
|
comp_index = self.vm.patch.composite[index].get()
|
||||||
if self.kind.name == "banana":
|
comp_list = util.get_patch_composite_list(self.kind)
|
||||||
if comp_index == 64: # bus channel
|
try:
|
||||||
comp_index = 0
|
val = comp_list[comp_index - 1]
|
||||||
val = util.get_patch_composite_list(self.kind)[comp_index - 1]
|
except IndexError as e:
|
||||||
|
val = comp_list[-1]
|
||||||
|
self.logger.error(f"{type(e).__name__}: {e}")
|
||||||
self.nvda.speak(f"Patch COMPOSITE {key[-1]} {val}")
|
self.nvda.speak(f"Patch COMPOSITE {key[-1]} {val}")
|
||||||
case [["PATCH", "COMPOSITE"], [key], ["KEY", "SPACE" | "ENTER"]]:
|
case [["PATCH", "COMPOSITE"], [key], ["KEY", "SPACE" | "ENTER"]]:
|
||||||
util.open_context_menu_for_buttonmenu(self, f"PATCH COMPOSITE||{key}")
|
util.open_context_menu_for_buttonmenu(self, f"PATCH COMPOSITE||{key}")
|
||||||
|
Loading…
Reference in New Issue
Block a user