[WIP/TEST] Controller : CTranslate2のモデル変更時処理を実装

This commit is contained in:
misyaguziya
2024-01-19 01:27:41 +09:00
parent a24e77be98
commit a1b53dc2b0
3 changed files with 22 additions and 7 deletions

View File

@@ -326,9 +326,11 @@ class _CreateDropdownMenuWindow(CTkToplevel):
def _withdraw(self, e=None):
self.withdraw()
self.attach_widget.winfo_toplevel().unbind("<Configure>", self.BIND_CONFIGURE_FUNC_ID)
if self.BIND_CONFIGURE_FUNC_ID in self.attach_widget.winfo_toplevel().bind():
self.attach_widget.winfo_toplevel().unbind("<Configure>", self.BIND_CONFIGURE_FUNC_ID)
self.attach_widget.unbind("<Unmap>", self.BIND_UNMAP_FUNC_ID)
self.attach_widget.winfo_toplevel().unbind("<Button-1>", self.BIND_BUTTON_1_FUNC_ID)
if self.BIND_BUTTON_1_FUNC_ID in self.attach_widget.winfo_toplevel().bind():
self.attach_widget.winfo_toplevel().unbind("<Button-1>", self.BIND_BUTTON_1_FUNC_ID)
self.hide = True