(self, event)
| 255 | self.mainFrame.command.Submit(cmd.GuiRemoveImplantsCommand(fitID=fitID, positions=positions)) |
| 256 | |
| 257 | def click(self, event): |
| 258 | fitID = self.mainFrame.getActiveFit() |
| 259 | fit = Fit.getInstance().getFit(fitID) |
| 260 | if fit.implantLocation == ImplantLocation.FIT: |
| 261 | mainRow, _ = self.HitTest(event.Position) |
| 262 | if mainRow != -1: |
| 263 | col = self.getColumn(event.Position) |
| 264 | if col == self.getColIndex(State): |
| 265 | fitID = self.mainFrame.getActiveFit() |
| 266 | try: |
| 267 | mainImplant = self.implants[mainRow] |
| 268 | except IndexError: |
| 269 | return |
| 270 | if mainImplant in self.original: |
| 271 | mainPosition = self.original.index(mainImplant) |
| 272 | positions = [] |
| 273 | for row in self.getSelectedRows(): |
| 274 | try: |
| 275 | implant = self.implants[row] |
| 276 | except IndexError: |
| 277 | continue |
| 278 | if implant in self.original: |
| 279 | positions.append(self.original.index(implant)) |
| 280 | if mainPosition not in positions: |
| 281 | positions = [mainPosition] |
| 282 | self.mainFrame.command.Submit(cmd.GuiToggleImplantStatesCommand( |
| 283 | fitID=fitID, |
| 284 | mainPosition=mainPosition, |
| 285 | positions=positions)) |
| 286 | return |
| 287 | event.Skip() |
| 288 | |
| 289 | def spawnMenu(self, event): |
| 290 | clickedPos = self.getRowByAbs(event.Position) |
nothing calls this directly
no test coverage detected