Bug when more than one tab are visible, only one tab is refreshed fixed
authorlaurent
Tue, 15 Dec 2009 10:00:21 +0100
changeset 489 0caeaa75dcff
parent 488 93bf600bae11
child 490 c47a09e1da3e
Bug when more than one tab are visible, only one tab is refreshed fixed
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Tue Dec 15 08:53:29 2009 +0100
+++ b/PLCOpenEditor.py	Tue Dec 15 10:00:21 2009 +0100
@@ -1160,10 +1160,17 @@
 
     def RefreshEditor(self, variablepanel = True):
         selected = self.TabsOpened.GetSelection()
-        if selected != -1:
-            window = self.TabsOpened.GetPage(selected)
+        visible = []
+        if USE_AUI:
+            for child in self.TabsOpened.GetChildren():
+                if isinstance(child, wx.aui.AuiTabCtrl):
+                    visible.append(child.GetActivePage())
+        elif selected >= 0:
+            visible.append(selected)
+        for idx in visible:
+            window = self.TabsOpened.GetPage(idx)
             window.RefreshView()
-            if not window.IsDebugging() and variablepanel:
+            if not window.IsDebugging() and idx == selected and variablepanel:
                 self.RefreshVariablePanel(window.GetTagName())
 
     def RefreshVariablePanel(self, tagname):