(self, event)
| 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 = [] |
nothing calls this directly
no test coverage detected