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

Method startDrag

gui/builtinViews/fittingView.py:248–277  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

246 return self.activeFitID
247
248 def startDrag(self, event):
249 srcRow = event.GetIndex()
250
251 if srcRow == -1:
252 return
253 if srcRow in self.blanks:
254 return
255 try:
256 mod = self.mods[srcRow]
257 except IndexError:
258 return
259 if not isinstance(self.mods[srcRow], Module):
260 return
261 if mod.isEmpty:
262 return
263 fit = Fit.getInstance().getFit(self.activeFitID)
264 if mod not in fit.modules:
265 return
266
267 self.unselectAll()
268 self.Select(srcRow, True)
269
270 data = wx.TextDataObject()
271 dataStr = "fitting:" + str(fit.modules.index(mod))
272 data.SetText(dataStr)
273
274 dropSource = wx.DropSource(self)
275 dropSource.SetData(data)
276 DragDropHelper.data = dataStr
277 dropSource.DoDragDrop()
278
279 def getSelectedMods(self):
280 mods = []

Callers

nothing calls this directly

Calls 3

getFitMethod · 0.80
unselectAllMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected