Remove charge changing functionality from module add command, as it wasn't used anyway

This commit is contained in:
DarkPhoenix
2019-04-21 11:36:21 +03:00
parent 7abc14eb7f
commit df6e7b5772

View File

@@ -23,16 +23,8 @@ class GuiAddLocalModuleCommand(wx.Command):
position = self.position
success = False
item = Market.getInstance().getItem(self.itemID)
# Charge
if item.isCharge and position is not None:
cmd = CalcChangeModuleChargesCommand(fitID=self.fitID, projected=False, chargeMap={position: self.itemID})
success = self.internalHistory.submit(cmd)
if not success:
Fit.getInstance().recalc(self.fitID)
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
return False
# Module to position
elif position is not None:
if position is not None:
cmd = CalcReplaceLocalModuleCommand(fitID=self.fitID, position=position, newModInfo=ModuleInfo(itemID=self.itemID))
success = self.internalHistory.submit(cmd)
# Something went wrong with trying to fit the module into specific location, keep going to append it instead