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) |