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

Method startDrag

gui/builtinAdditionPanes/cargoView.py:117–134  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

115 fitID=fitID, itemID=int(data[1]), amount=1))
116
117 def startDrag(self, event):
118 row = event.GetIndex()
119
120 if row != -1:
121 data = wx.TextDataObject()
122 try:
123 dataStr = "cargo:{}".format(self.cargo[row].itemID)
124 except IndexError:
125 return
126 data.SetText(dataStr)
127
128 self.unselectAll()
129 self.Select(row, True)
130
131 dropSource = wx.DropSource(self)
132 dropSource.SetData(data)
133 DragDropHelper.data = dataStr
134 dropSource.DoDragDrop()
135
136 def kbEvent(self, event):
137 keycode = event.GetKeyCode()

Callers

nothing calls this directly

Calls 1

unselectAllMethod · 0.80

Tested by

no test coverage detected