controls/DebugVariablePanel/DebugVariableTextViewer.py
changeset 3871 5d23a47937c4
parent 3765 88fe6fc9fd38
equal deleted inserted replaced
3870:be827d87b515 3871:5d23a47937c4
   241         w, h = self.GetTextExtent(item_path)
   241         w, h = self.GetTextExtent(item_path)
   242 
   242 
   243         # Test if mouse has been pressed in this bounding box. In that case
   243         # Test if mouse has been pressed in this bounding box. In that case
   244         # start a move drag'n drop of item variable
   244         # start a move drag'n drop of item variable
   245         x, y = event.GetPosition()
   245         x, y = event.GetPosition()
   246         item_path_bbox = wx.Rect(20, (height - h) / 2, w, h)
   246         item_path_bbox = wx.Rect(20, (height - h) // 2, w, h)
   247         if item_path_bbox.Contains(x, y):
   247         if item_path_bbox.Contains(x, y):
   248             self.ShowButtons(False)
   248             self.ShowButtons(False)
   249             data = wx.TextDataObject(str((item.GetVariable(), "debug", "move")))
   249             data = wx.TextDataObject(str((item.GetVariable(), "debug", "move")))
   250             dragSource = wx.DropSource(self)
   250             dragSource = wx.DropSource(self)
   251             dragSource.SetData(data)
   251             dragSource.SetData(data)