Rework "change drone/cargo amount" commands

This commit is contained in:
DarkPhoenix
2019-04-13 20:33:23 +03:00
parent aab9b39fea
commit bb47df2119
18 changed files with 143 additions and 119 deletions

View File

@@ -33,10 +33,7 @@ class FitAddModuleCommand(wx.Command):
for oldMod in fit.modules:
if oldMod.getModifiedItemAttr('subSystemSlot') == newMod.getModifiedItemAttr('subSystemSlot') and newMod.slot == oldMod.slot:
from .fitReplaceModule import FitReplaceModuleCommand
self.subsystemCmd = FitReplaceModuleCommand(
fitID=self.fitID,
position=oldMod.modPosition,
newModInfo=self.newModInfo)
self.subsystemCmd = FitReplaceModuleCommand(fitID=self.fitID, position=oldMod.modPosition, newModInfo=self.newModInfo)
return self.subsystemCmd.Do()
if not newMod.fits(fit):