(self, event)
| 287 | event.Skip() |
| 288 | |
| 289 | def spawnMenu(self, event): |
| 290 | clickedPos = self.getRowByAbs(event.Position) |
| 291 | self.ensureSelection(clickedPos) |
| 292 | |
| 293 | fitID = self.mainFrame.getActiveFit() |
| 294 | if fitID is None: |
| 295 | return |
| 296 | |
| 297 | if self.getColumn(self.screenToClientFixed(event.Position)) == self.getColIndex(State): |
| 298 | return |
| 299 | |
| 300 | mainItem = self.get(clickedPos) |
| 301 | |
| 302 | contexts = [] |
| 303 | if mainItem is not None: |
| 304 | sMkt = Market.getInstance() |
| 305 | |
| 306 | if isinstance(mainItem, EosModule): |
| 307 | modSrcContext = 'projectedModule' |
| 308 | modItemContext = _t('Projected Item') |
| 309 | modFullContext = (modSrcContext, modItemContext) |
| 310 | contexts.append(modFullContext) |
| 311 | if mainItem.charge is not None: |
| 312 | chargeSrcContext = 'projectedCharge' |
| 313 | chargeItemContext = sMkt.getCategoryByItem(mainItem.charge).displayName |
| 314 | chargeFullContext = (chargeSrcContext, chargeItemContext) |
| 315 | contexts.append(chargeFullContext) |
| 316 | elif isinstance(mainItem, EosDrone): |
| 317 | srcContext = 'projectedDrone' |
| 318 | itemContext = _t('Projected Item') |
| 319 | droneFullContext = (srcContext, itemContext) |
| 320 | contexts.append(droneFullContext) |
| 321 | elif isinstance(mainItem, EosFighter): |
| 322 | srcContext = 'projectedFighter' |
| 323 | itemContext = _t('Projected Item') |
| 324 | fighterFullContext = (srcContext, itemContext) |
| 325 | contexts.append(fighterFullContext) |
| 326 | else: |
| 327 | fitSrcContext = 'projectedFit' |
| 328 | fitItemContext = _t('Projected Item') |
| 329 | fitFullContext = (fitSrcContext, fitItemContext) |
| 330 | contexts.append(fitFullContext) |
| 331 | contexts.append(('projected',)) |
| 332 | |
| 333 | selection = self.getSelectedProjectors() |
| 334 | menu = ContextMenu.getMenu(self, mainItem, selection, *contexts) |
| 335 | if menu is not None: |
| 336 | self.PopupMenu(menu) |
| 337 | |
| 338 | def onLeftDoubleClick(self, event): |
| 339 | row, _ = self.HitTest(event.Position) |
nothing calls this directly
no test coverage detected