IDEFrame.py
branchwxPython4
changeset 3317 ecfa689684c5
parent 3309 446b2c3da6e6
child 3379 c3d462118d37
--- a/IDEFrame.py	Mon Sep 13 13:02:52 2021 +0200
+++ b/IDEFrame.py	Mon Sep 13 17:57:47 2021 +0200
@@ -759,6 +759,8 @@
         self.SetRefreshFunctions()
         self.SetDeleteFunctions()
 
+        self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
+
         wx.CallAfter(self.InitFindDialog)
 
     def __del__(self):
@@ -1150,6 +1152,9 @@
     def OnQuitMenu(self, event):
         self.Close()
 
+    def OnCloseFrame(self, event):
+        self.AUIManager.UnInit()
+
     # -------------------------------------------------------------------------------
     #                            Edit Menu Functions
     # -------------------------------------------------------------------------------