Fix bug in refreshing menu after tab selection changed
authorlaurent
Thu, 12 Jan 2012 17:04:22 +0100
changeset 624 efedc9d06a59
parent 623 e747685e4241
child 625 b7062a7018ec
Fix bug in refreshing menu after tab selection changed
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Mon Jan 09 18:16:52 2012 +0100
+++ b/PLCOpenEditor.py	Thu Jan 12 17:04:22 2012 +0100
@@ -766,6 +766,8 @@
     ## Callback function when AUINotebook Page closed with CloseButton
     #  @param event AUINotebook Event.
     def OnPageClose(self, event):
+        # Refresh all window elements that have changed
+        wx.CallAfter(self._Refresh, TITLE, TOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
         wx.CallAfter(self.RefreshTabCtrlEvent)
         event.Skip()
 
@@ -1213,7 +1215,7 @@
             else:
                 wx.CallAfter(self.SelectInstancesTreeItem, self.InstancesTree.GetRootItem(), window.GetInstancePath())
             window.RefreshView()
-            self._Refresh(FILEMENU, EDITMENU, DISPLAYMENU, TOOLBAR)
+        wx.CallAfter(self._Refresh, FILEMENU, EDITMENU, DISPLAYMENU, TOOLBAR)
         event.Skip()
 
     def RefreshEditor(self):