MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / handleListDrag

Method handleListDrag

gui/builtinAdditionPanes/cargoView.py:100–115  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

swapModuleMethod · 0.95
getActiveFitMethod · 0.45

Tested by

no test coverage detected