Make sure to do fit recalculation if it was changed after the last one
This commit is contained in:
@@ -55,12 +55,14 @@ class GuiChangeProjectedItemsProjectionRangeCommand(wx.Command):
|
||||
itemID=pDroneItemID,
|
||||
projectionRange=self.projectionRange)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = True
|
||||
for pFighterPosition in self.pFighterPositions:
|
||||
cmd = CalcChangeProjectedFighterProjectionRangeCommand(
|
||||
fitID=self.fitID,
|
||||
position=pFighterPosition,
|
||||
projectionRange=self.projectionRange)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = True
|
||||
for pFitID in self.pFitIDs:
|
||||
cmd = CalcChangeProjectedFitProjectionRangeCommand(
|
||||
fitID=self.fitID,
|
||||
|
||||
@@ -72,18 +72,21 @@ class GuiChangeProjectedItemStatesCommand(wx.Command):
|
||||
itemID=pDroneItemID,
|
||||
state=False if self.proposedState == 'inactive' else True)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = True
|
||||
for pFighterPosition in self.pFighterPositions:
|
||||
cmd = CalcChangeProjectedFighterStateCommand(
|
||||
fitID=self.fitID,
|
||||
position=pFighterPosition,
|
||||
state=False if self.proposedState == 'inactive' else True)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = True
|
||||
for pFitID in self.pFitIDs:
|
||||
cmd = CalcChangeProjectedFitStateCommand(
|
||||
fitID=self.fitID,
|
||||
projectedFitID=pFitID,
|
||||
state=False if self.proposedState == 'inactive' else True)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = cmd.needsGuiRecalc
|
||||
success = any(results)
|
||||
sFit = Fit.getInstance()
|
||||
if needRecalc:
|
||||
|
||||
@@ -49,9 +49,11 @@ class GuiRemoveProjectedItemsCommand(wx.Command):
|
||||
for pDroneItemID in self.pDroneItemIDs:
|
||||
cmd = CalcRemoveProjectedDroneCommand(fitID=self.fitID, itemID=pDroneItemID, amount=self.amount)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = True
|
||||
for pFighterPosition in sorted(self.pFighterPositions, reverse=True):
|
||||
cmd = CalcRemoveProjectedFighterCommand(fitID=self.fitID, position=pFighterPosition)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
needRecalc = True
|
||||
for pFitID in self.pFitIDs:
|
||||
cmd = CalcRemoveProjectedFitCommand(fitID=self.fitID, projectedFitID=pFitID, amount=self.amount)
|
||||
results.append(self.internalHistory.submit(cmd))
|
||||
|
||||
Reference in New Issue
Block a user