Adds items that are double clicks from the market browser. We handle both modules and ammo
(self, event)
| 369 | self.parent.SetPageTextIcon(pageIndex, text, bitmap) |
| 370 | |
| 371 | def appendItem(self, event): |
| 372 | """ |
| 373 | Adds items that are double clicks from the market browser. We handle both modules and ammo |
| 374 | """ |
| 375 | if not self: |
| 376 | event.Skip() |
| 377 | return |
| 378 | if self.parent.IsActive(self): |
| 379 | itemID = event.itemID |
| 380 | fitID = self.activeFitID |
| 381 | if fitID is not None: |
| 382 | item = Market.getInstance().getItem(itemID, eager='group.category') |
| 383 | if item is None: |
| 384 | event.Skip() |
| 385 | return |
| 386 | batchOp = wx.GetMouseState().GetModifiers() == wx.MOD_ALT and getattr(event, 'allowBatch', None) is not False |
| 387 | if (item.isModule and not batchOp) or item.isSubsystem: |
| 388 | self.mainFrame.command.Submit(cmd.GuiAddLocalModuleCommand(fitID=fitID, itemID=itemID)) |
| 389 | elif item.isModule and batchOp: |
| 390 | self.mainFrame.command.Submit(cmd.GuiFillWithNewLocalModulesCommand(fitID=fitID, itemID=itemID)) |
| 391 | |
| 392 | event.Skip() |
| 393 | |
| 394 | def removeItem(self, event): |
| 395 | """Double Left Click - remove module""" |
nothing calls this directly
no test coverage detected