| 31 | |
| 32 | |
| 33 | class CargoViewDrop(wx.DropTarget): |
| 34 | def __init__(self, dropFn, *args, **kwargs): |
| 35 | super(CargoViewDrop, self).__init__(*args, **kwargs) |
| 36 | self.dropFn = dropFn |
| 37 | # this is really transferring an EVE itemID |
| 38 | self.dropData = wx.TextDataObject() |
| 39 | self.SetDataObject(self.dropData) |
| 40 | |
| 41 | def OnData(self, x, y, t): |
| 42 | if self.GetData(): |
| 43 | dragged_data = DragDropHelper.data |
| 44 | |
| 45 | if dragged_data is None: |
| 46 | return t |
| 47 | |
| 48 | data = dragged_data.split(':') |
| 49 | self.dropFn(x, y, data) |
| 50 | return t |
| 51 | |
| 52 | |
| 53 | # @todo: Was copied form another class and modified. Look through entire file, refine |