# HG changeset patch # User laurent # Date 1326384262 -3600 # Node ID efedc9d06a599e45539dfd0410e831ed23186b9f # Parent e747685e4241c81da1df4dcff812454e9e3944b7 Fix bug in refreshing menu after tab selection changed diff -r e747685e4241 -r efedc9d06a59 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):