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]
|
||||
name = "nvda_voicemeeter"
|
||||
version = "0.5.2"
|
||||
version = "0.5.3"
|
||||
description = "A Voicemeeter app compatible with NVDA"
|
||||
authors = [
|
||||
{ name = "onyx-and-iris", email = "code@onyxandiris.online" },
|
||||
|
@ -202,7 +202,7 @@ class Builder:
|
||||
[
|
||||
psg.ButtonMenu(
|
||||
f"PC{i + 1}",
|
||||
size=(6, 2),
|
||||
size=(5, 2),
|
||||
menu_def=["", outputs],
|
||||
key=f"PATCH COMPOSITE||PC{i + 1}",
|
||||
)
|
||||
|
@ -613,10 +613,12 @@ class NVDAVMWindow(psg.Window):
|
||||
else:
|
||||
index = int(key[-1]) - 1
|
||||
comp_index = self.vm.patch.composite[index].get()
|
||||
if self.kind.name == "banana":
|
||||
if comp_index == 64: # bus channel
|
||||
comp_index = 0
|
||||
val = util.get_patch_composite_list(self.kind)[comp_index - 1]
|
||||
comp_list = util.get_patch_composite_list(self.kind)
|
||||
try:
|
||||
val = comp_list[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}")
|
||||
case [["PATCH", "COMPOSITE"], [key], ["KEY", "SPACE" | "ENTER"]]:
|
||||
util.open_context_menu_for_buttonmenu(self, f"PATCH COMPOSITE||{key}")
|
||||
|
Loading…
Reference in New Issue
Block a user