Skip to content

Commit f504e2b

Browse files
committed
fix(ui): handle ttkbootstrap theme TclError during combobox popdown
Add error handling for TclError that occurs when applying themes with ttkbootstrap combobox popdowns. This is a known issue with ttkbootstrap where combobox popdown widgets may not exist when theme changes occur. The error doesn't affect functionality and can be safely ignored.
1 parent db4c8ad commit f504e2b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • pyclashbot/interface

pyclashbot/interface/ui.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,12 @@ def _apply_theme(self, theme_name: str, skip_variable_update: bool = False) -> N
811811
self.theme_var.set(selected)
812812
finally:
813813
self._suspend_traces -= 1
814-
self._style.theme_use(selected)
814+
try:
815+
self._style.theme_use(selected)
816+
except tk.TclError:
817+
# Handle ttkbootstrap combobox popdown errors during theme changes
818+
# This is a known issue with ttkbootstrap and doesn't affect functionality
819+
pass
815820
self._refresh_theme_colours()
816821

817822
def _label_foreground(self) -> str:

0 commit comments

Comments
 (0)