Handles dragging of items from various pyfa displays which support it data is list with two indices: data[0] is hard-coded str of originating source data[1] is typeID or index of data we want to manipulate
(self, x, y, data)
| 244 | dropSource.DoDragDrop() |
| 245 | |
| 246 | def handleDragDrop(self, x, y, data): |
| 247 | """ |
| 248 | Handles dragging of items from various pyfa displays which support it |
| 249 | |
| 250 | data is list with two indices: |
| 251 | data[0] is hard-coded str of originating source |
| 252 | data[1] is typeID or index of data we want to manipulate |
| 253 | """ |
| 254 | if data[0] == "fighter": # we want to merge fighters |
| 255 | srcRow = int(data[1]) |
| 256 | dstRow, _ = self.HitTest((x, y)) |
| 257 | if srcRow != -1 and dstRow != -1: |
| 258 | self._merge(srcRow, dstRow) |
| 259 | elif data[0] == "market": |
| 260 | wx.PostEvent(self.mainFrame, ItemSelected(itemID=int(data[1]))) |
| 261 | |
| 262 | @staticmethod |
| 263 | def _merge(src, dst): |