From 7357cacc30a8db3f2bbd3b9ae8509499cfce5629 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 2 Sep 2023 05:00:38 +0100 Subject: [PATCH] fixes bug when pressing F2 on settings tab --- src/nvda_voicemeeter/window.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 13207ae..7ace87e 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -242,20 +242,20 @@ class NVDAVMWindow(psg.Window): tab = values["tabs"] if tab in ("Physical Strip", "Virtual Strip", "Buses"): data = self.popup_rename("Label", title=f"Rename {tab}", tab=tab) - if not data: - continue - index = int(data["Index"]) - 1 - match tab: - case "Physical Strip" | "Virtual Strip": - label = data.get("Edit") or self.cache["labels"]["strip"][f"STRIP {index}||LABEL"] - self.vm.strip[index].label = label - self[f"STRIP {index}||LABEL"].update(value=label) - self.cache["labels"]["strip"][f"STRIP {index}||LABEL"] = label - case "Buses": - label = data.get("Edit") or self.cache["labels"]["bus"][f"BUS {index}||LABEL"] - self.vm.bus[index].label = label - self[f"BUS {index}||LABEL"].update(value=label) - self.cache["labels"]["bus"][f"BUS {index}||LABEL"] = label + if not data: + continue + index = int(data["Index"]) - 1 + match tab: + case "Physical Strip" | "Virtual Strip": + label = data.get("Edit") or self.cache["labels"]["strip"][f"STRIP {index}||LABEL"] + self.vm.strip[index].label = label + self[f"STRIP {index}||LABEL"].update(value=label) + self.cache["labels"]["strip"][f"STRIP {index}||LABEL"] = label + case "Buses": + label = data.get("Edit") or self.cache["labels"]["bus"][f"BUS {index}||LABEL"] + self.vm.bus[index].label = label + self[f"BUS {index}||LABEL"].update(value=label) + self.cache["labels"]["bus"][f"BUS {index}||LABEL"] = label # Menus case [["Restart", "Audio", "Engine"], ["MENU"]]: