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)
| 98 | event.Skip() |
| 99 | |
| 100 | def handleListDrag(self, x, y, data): |
| 101 | """ |
| 102 | Handles dragging of items from various pyfa displays which support it |
| 103 | |
| 104 | data is list with two indices: |
| 105 | data[0] is hard-coded str of originating source |
| 106 | data[1] is typeID or index of data we want to manipulate |
| 107 | """ |
| 108 | |
| 109 | if data[0] == "fitting": |
| 110 | self.swapModule(x, y, int(data[1])) |
| 111 | elif data[0] == "market": |
| 112 | fitID = self.mainFrame.getActiveFit() |
| 113 | if fitID: |
| 114 | self.mainFrame.command.Submit(cmd.GuiAddCargoCommand( |
| 115 | fitID=fitID, itemID=int(data[1]), amount=1)) |
| 116 | |
| 117 | def startDrag(self, event): |
| 118 | row = event.GetIndex() |
nothing calls this directly
no test coverage detected