controls/DebugVariablePanel/DebugVariableTextViewer.py
changeset 1878 fb73a6b6622d
parent 1853 47a3f39bead0
child 2437 105c20fdeb19
equal deleted inserted replaced
1877:da5f1fa46f2b 1878:fb73a6b6622d
   203         # Get first item
   203         # Get first item
   204         item = self.ItemsDict.values()[0]
   204         item = self.ItemsDict.values()[0]
   205 
   205 
   206         # Get item variable path masked according Debug Variable Panel mask
   206         # Get item variable path masked according Debug Variable Panel mask
   207         item_path = item.GetVariable(
   207         item_path = item.GetVariable(
   208                 self.ParentWindow.GetVariableNameMask())
   208             self.ParentWindow.GetVariableNameMask())
   209 
   209 
   210         # Draw item variable path at Viewer left side
   210         # Draw item variable path at Viewer left side
   211         w, h = gc.GetTextExtent(item_path)
   211         w, h = gc.GetTextExtent(item_path)
   212         gc.DrawText(item_path, 20, (height - h) / 2)
   212         gc.DrawText(item_path, 20, (height - h) / 2)
   213 
   213 
   238         item = self.ItemsDict.values()[0]
   238         item = self.ItemsDict.values()[0]
   239 
   239 
   240         # Calculate item path bounding box
   240         # Calculate item path bounding box
   241         _width, height = self.GetSize()
   241         _width, height = self.GetSize()
   242         item_path = item.GetVariable(
   242         item_path = item.GetVariable(
   243                 self.ParentWindow.GetVariableNameMask())
   243             self.ParentWindow.GetVariableNameMask())
   244         w, h = self.GetTextExtent(item_path)
   244         w, h = self.GetTextExtent(item_path)
   245 
   245 
   246         # Test if mouse has been pressed in this bounding box. In that case
   246         # Test if mouse has been pressed in this bounding box. In that case
   247         # start a move drag'n drop of item variable
   247         # start a move drag'n drop of item variable
   248         x, y = event.GetPosition()
   248         x, y = event.GetPosition()