controls/DebugVariablePanel/DebugVariableGraphicPanel.py
changeset 1209 953a8f14040a
parent 1207 fb9799a0c0f7
child 1212 b351d3a7917c
equal deleted inserted replaced
1208:d22fcdfae8d0 1209:953a8f14040a
    49     
    49     
    50     def __del__(self):
    50     def __del__(self):
    51         self.ParentWindow = None
    51         self.ParentWindow = None
    52     
    52     
    53     def OnDragOver(self, x, y, d):
    53     def OnDragOver(self, x, y, d):
    54         self.ParentControl.OnMouseDragging(x, y)
       
    55         self.ParentWindow.RefreshHighlight(x, y)
    54         self.ParentWindow.RefreshHighlight(x, y)
    56         return wx.TextDropTarget.OnDragOver(self, x, y, d)
    55         return wx.TextDropTarget.OnDragOver(self, x, y, d)
    57         
    56         
    58     def OnDropText(self, x, y, data):
    57     def OnDropText(self, x, y, data):
    59         message = None
    58         message = None
   266         self.RefreshCanvasPosition()
   265         self.RefreshCanvasPosition()
   267         self.ForceRefresh()
   266         self.ForceRefresh()
   268     
   267     
   269     def SetCursorTick(self, cursor_tick):
   268     def SetCursorTick(self, cursor_tick):
   270         self.CursorTick = cursor_tick
   269         self.CursorTick = cursor_tick
   271         self.Fixed = True
   270         self.Fixed = cursor_tick is not None
   272         self.UpdateCursorTick() 
   271         self.UpdateCursorTick() 
   273     
   272     
   274     def MoveCursorTick(self, move):
   273     def MoveCursorTick(self, move):
   275         if self.CursorTick is not None:
   274         if self.CursorTick is not None:
   276             cursor_tick = max(self.Ticks[0], 
   275             cursor_tick = max(self.Ticks[0], 
   627             idx = len(self.GraphicPanels)
   626             idx = len(self.GraphicPanels)
   628         item = DebugVariableItem(self, iec_path, True)
   627         item = DebugVariableItem(self, iec_path, True)
   629         result = self.AddDataConsumer(iec_path.upper(), item)
   628         result = self.AddDataConsumer(iec_path.upper(), item)
   630         if result is not None or force:
   629         if result is not None or force:
   631             
   630             
       
   631             self.Freeze()
   632             if item.IsNumVariable():
   632             if item.IsNumVariable():
   633                 panel = DebugVariableGraphicViewer(self.GraphicsWindow, self, [item], GRAPH_PARALLEL)
   633                 panel = DebugVariableGraphicViewer(self.GraphicsWindow, self, [item], GRAPH_PARALLEL)
   634                 if self.CursorTick is not None:
   634                 if self.CursorTick is not None:
   635                     panel.SetCursorTick(self.CursorTick)
   635                     panel.SetCursorTick(self.CursorTick)
   636             else:
   636             else:
   639                 self.GraphicPanels.insert(idx, panel)
   639                 self.GraphicPanels.insert(idx, panel)
   640             else:
   640             else:
   641                 self.GraphicPanels.append(panel)
   641                 self.GraphicPanels.append(panel)
   642             self.ResetVariableNameMask()
   642             self.ResetVariableNameMask()
   643             self.RefreshGraphicsSizer()
   643             self.RefreshGraphicsSizer()
       
   644             self.Thaw()
   644             self.ForceRefresh()
   645             self.ForceRefresh()
   645     
   646     
   646     def MoveValue(self, iec_path, idx = None):
   647     def MoveValue(self, iec_path, idx = None):
   647         if idx is None:
   648         if idx is None:
   648             idx = len(self.GraphicPanels)
   649             idx = len(self.GraphicPanels)