Fix segmentation fault on opening and closing of editor tabs
authorlaurent
Thu, 31 Mar 2011 17:36:52 +0200
changeset 514 ee435a8546b9
parent 513 fb787f6cbe33
child 515 55213a347f16
Fix segmentation fault on opening and closing of editor tabs
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Thu Mar 31 12:09:52 2011 +0200
+++ b/PLCOpenEditor.py	Thu Mar 31 17:36:52 2011 +0200
@@ -732,15 +732,7 @@
             window = self.TabsOpened.GetPage(selected)
             if not window.IsDebugging():
                 self.VariablePanelIndexer.RemoveVariablePanel(window.GetTagName())
-            # Refresh Tab selection
-            if self.TabsOpened.GetPageCount() > 0:
-                new_index = min(selected, self.TabsOpened.GetPageCount() - 1)
-                self.TabsOpened.SetSelection(new_index)
-                window = self.TabsOpened.GetPage(selected)
-                if not window.IsDebugging():
-                    self.VariablePanelIndexer.ChangeVariablePanel(window.GetTagName())
-        # Refresh all window elements that have changed
-        wx.CallAfter(self._Refresh, TITLE, TOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
+        
         wx.CallAfter(self.RefreshTabCtrlEvent)
         event.Skip()
 
@@ -1575,7 +1567,6 @@
                     self.TabsOpened.SetSelection(i)
                     window.SetFocus()
                     self.RefreshPageTitles()
-                    self._Refresh(FILEMENU, EDITMENU, TOOLBAR)
     
     def OnTypesTreeRightUp(self, event):
         if wx.Platform == '__WXMSW__':