ensure we don't attempt to delete a menu key twice

patch bump
This commit is contained in:
onyx-and-iris 2023-07-07 03:37:06 +01:00
parent 674999a461
commit e4068277f7
2 changed files with 16 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "voicemeeter-compact"
version = "1.8.2"
version = "1.8.3"
description = "A Compact Voicemeeter Remote App"
authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT"

View File

@ -315,16 +315,21 @@ class Menus(tk.Menu):
def menu_teardown(self, i):
# remove config load menus
[
removed = []
for key in self.target.configs.keys():
if key not in self.config_defaults:
try:
self.menu_configs_load.delete(key)
for key in self.target.configs.keys()
if key not in self.config_defaults
]
[
removed.append(key)
except tk._tkinter.tclError as e:
self.logger.warning(f"{type(e).__name__}: {e}")
for key in self.parent.userconfigs.keys():
if key not in self.config_defaults and key not in removed:
try:
self.menu_configs_load.delete(key)
for key in self.parent.userconfigs.keys()
if key not in self.config_defaults
]
except tk._tkinter.tclError as e:
self.logger.warning(f"{type(e).__name__}: {e}")
[
self.menu_vban.entryconfig(j, state="disabled")