Fix booster removal

This commit is contained in:
DarkPhoenix
2019-04-19 22:57:06 +03:00
parent f541b4329e
commit fc4a10efe3
2 changed files with 5 additions and 1 deletions

View File

@@ -152,7 +152,10 @@ class BoosterView(d.Display):
def removeBooster(self, booster):
fitID = self.mainFrame.getActiveFit()
self.mainFrame.command.Submit(cmd.GuiRemoveBoosterCommand(fitID=fitID, position=self.original.index(booster)))
if booster in self.original:
position = self.original.index(booster)
self.mainFrame.command.Submit(cmd.GuiRemoveBoosterCommand(
fitID=fitID, position=position))
def click(self, event):
event.Skip()