Make sure we recalc during swaps from cargo to module
This commit is contained in:
@@ -34,7 +34,7 @@ class GuiCargoToModuleCommand(wx.Command):
|
||||
fit = sFit.getFit(self.fitID)
|
||||
module = fit.modules[self.moduleIdx]
|
||||
cargo = fit.cargo[self.cargoIdx]
|
||||
result = None
|
||||
result = False
|
||||
|
||||
# We're trying to move a charge from cargo to a slot. Use SetCharge command (don't respect move vs copy)
|
||||
if sFit.isAmmo(cargo.item.ID):
|
||||
@@ -64,6 +64,7 @@ class GuiCargoToModuleCommand(wx.Command):
|
||||
result = self.internal_history.Submit(self.removeCmd)
|
||||
|
||||
if result:
|
||||
sFit.recalc(self.fitID)
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID))
|
||||
return result
|
||||
|
||||
|
||||
@@ -58,9 +58,10 @@ class GuiModuleToCargoCommand(wx.Command):
|
||||
if not self.copy: # if not copying, remove module
|
||||
self.internal_history.Submit(FitRemoveModuleCommand(self.mainFrame.getActiveFit(), [self.moduleIdx]))
|
||||
|
||||
|
||||
if result:
|
||||
sFit.recalc(self.fitID)
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID, action="moddel", typeID=module.item.ID))
|
||||
|
||||
return result
|
||||
|
||||
def Undo(self):
|
||||
|
||||
Reference in New Issue
Block a user