ensure Virtual Input gets correct label if cleared

This commit is contained in:
onyx-and-iris 2023-09-10 14:32:31 +01:00
parent 681bf8e85c
commit 5069db97da

View File

@ -324,7 +324,7 @@ class NVDAVMWindow(psg.Window):
self.cache["labels"][f"STRIP {index}||LABEL"] = label
case "Virtual Strip":
index += self.kind.phys_in
label = data.get("Edit") or f"Virtual Input {index + 1}"
label = data.get("Edit") or f"Virtual Input {index - self.kind.phys_in + 1}"
self.vm.strip[index].label = label
self[f"STRIP {index}||LABEL"].update(value=label)
self.cache["labels"][f"STRIP {index}||LABEL"] = label