diff --git a/pyproject.toml b/pyproject.toml index a976d7e..578fe2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT" diff --git a/vmcompact/menu.py b/vmcompact/menu.py index 0e9c7f3..7cf30d2 100644 --- a/vmcompact/menu.py +++ b/vmcompact/menu.py @@ -315,16 +315,21 @@ class Menus(tk.Menu): def menu_teardown(self, i): # remove config load menus - [ - self.menu_configs_load.delete(key) - for key in self.target.configs.keys() - if key not in self.config_defaults - ] - [ - self.menu_configs_load.delete(key) - for key in self.parent.userconfigs.keys() - if key not in self.config_defaults - ] + removed = [] + for key in self.target.configs.keys(): + if key not in self.config_defaults: + try: + self.menu_configs_load.delete(key) + 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) + except tk._tkinter.tclError as e: + self.logger.warning(f"{type(e).__name__}: {e}") [ self.menu_vban.entryconfig(j, state="disabled")