Fix booster removal
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -8,6 +8,7 @@ from service.fit import Fit
|
||||
|
||||
|
||||
class GuiRemoveBoosterCommand(wx.Command):
|
||||
|
||||
def __init__(self, fitID, position):
|
||||
wx.Command.__init__(self, True, 'Remove Booster')
|
||||
self.internalHistory = InternalCommandHistory()
|
||||
|
||||
Reference in New Issue
Block a user