Fix Segmentation Fault occurring when trying to open a new editor tab
authorlaurent
Thu, 21 Apr 2011 16:37:43 +0200
changeset 538 8c7605bbf673
parent 537 a31bf722aa82
child 539 8dbb1de154c1
Fix Segmentation Fault occurring when trying to open a new editor tab
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Thu Apr 21 16:06:33 2011 +0200
+++ b/PLCOpenEditor.py	Thu Apr 21 16:37:43 2011 +0200
@@ -1165,9 +1165,9 @@
         if selected >= 0:
             window = self.TabsOpened.GetPage(selected)
             if not window.IsDebugging():
-                self.SelectTypesTreeItem(window.GetTagName())
+                wx.CallAfter(self.SelectTypesTreeItem, window.GetTagName())
             else:
-                self.SelectInstancesTreeItem(self.InstancesTree.GetRootItem(), window.GetInstancePath())
+                wx.CallAfter(self.SelectInstancesTreeItem, self.InstancesTree.GetRootItem(), window.GetInstancePath())
             window.RefreshView()
             if not window.IsDebugging():
                 self.VariablePanelIndexer.ChangeVariablePanel(window.GetTagName())