MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / handleListDrag

Method handleListDrag

gui/builtinViews/fittingView.py:212–225  ·  view source on GitHub ↗

Handles dragging of items from various pyfa displays which support it data is list with two items: 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

210 event.Skip()
211
212 def handleListDrag(self, x, y, data):
213 """
214 Handles dragging of items from various pyfa displays which support it
215
216 data is list with two items:
217 data[0] is hard-coded str of originating source
218 data[1] is typeID or index of data we want to manipulate
219 """
220 if data[0] == "fitting":
221 self.swapItems(x, y, int(data[1]))
222 elif data[0] == "cargo":
223 self.swapCargo(x, y, int(data[1]))
224 elif data[0] == "market":
225 self.addModule(x, y, int(data[1]))
226
227 def handleDrag(self, type, fitID):
228 # Those are drags coming from pyfa sources, NOT builtin wx drags

Callers

nothing calls this directly

Calls 3

swapItemsMethod · 0.95
swapCargoMethod · 0.95
addModuleMethod · 0.95

Tested by

no test coverage detected