Rely on clicked item instead of selection where it makes sense

This commit is contained in:
DarkPhoenix
2019-04-22 17:33:40 +03:00
parent e4481e8fb4
commit be2e0b5de4
21 changed files with 93 additions and 116 deletions

View File

@@ -29,7 +29,7 @@ class AddToCargo(ContextMenu):
def activate(self, fullContext, mainItem, selection, i):
fitID = self.mainFrame.getActiveFit()
typeID = int(selection[0].ID)
typeID = int(mainItem.ID)
self.mainFrame.command.Submit(cmd.GuiAddCargoCommand(
fitID=fitID, itemID=typeID, amount=1))