fix error in CTkFont with multiple destroy calls #1692

This commit is contained in:
Tom Schimansky
2023-06-15 12:49:07 +02:00
parent 37b375d58b
commit abe33f7e81
3 changed files with 10 additions and 6 deletions

View File

@@ -52,7 +52,10 @@ class CTkFont(Font):
def remove_size_configure_callback(self, callback: Callable):
""" remove function, that gets called when font got configured """
self._size_configure_callback_list.remove(callback)
try:
self._size_configure_callback_list.remove(callback)
except ValueError:
pass
def create_scaled_tuple(self, font_scaling: float) -> Tuple[str, int, str]:
""" return scaled tuple representation of font in the form (family: str, size: int, style: str)"""