Fixed bug in DebugVariablePanel, cursor not reset when graphs were reset
authorLaurent Bessard
Thu, 02 May 2013 09:41:04 +0200
changeset 1084 baa09a1c7b15
parent 1083 40af794ecd4b
child 1085 906fe7f2c052
Fixed bug in DebugVariablePanel, cursor not reset when graphs were reset
controls/DebugVariablePanel.py
--- a/controls/DebugVariablePanel.py	Thu May 02 09:39:38 2013 +0200
+++ b/controls/DebugVariablePanel.py	Thu May 02 09:41:04 2013 +0200
@@ -1619,13 +1619,13 @@
     def SetCursorTick(self, cursor_tick):
         self.CursorTick = cursor_tick
         self.Fixed = True
-        self.ResetCursorTick() 
+        self.UpdateCursorTick() 
     
     def ResetCursorTick(self):
         self.CursorTick = None
-        self.ResetCursorTick()
-    
-    def ResetCursorTick(self):
+        self.UpdateCursorTick()
+    
+    def UpdateCursorTick(self):
         for panel in self.GraphicPanels:
             if isinstance(panel, DebugVariableGraphic):
                 panel.SetCursorTick(self.CursorTick)
@@ -1977,7 +1977,6 @@
         if len(self.Ticks) > 0:
             self.StartTick = max(self.Ticks[0], self.Ticks[-1] - self.CurrentRange)
             self.Fixed = False
-            self.CursorTick = None
             self.ResetCursorTick()
         event.Skip()
     
@@ -2214,6 +2213,7 @@
             self.Fixed = False
             for panel in self.GraphicPanels:
                 panel.ResetData()
+            self.ResetCursorTick()
 
     def RefreshGraphicsWindowScrollbars(self):
         xstart, ystart = self.GraphicsWindow.GetViewStart()