From df6e7b5772d0092eac0c5e3e7ec874611a4111f9 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sun, 21 Apr 2019 11:36:21 +0300 Subject: [PATCH] Remove charge changing functionality from module add command, as it wasn't used anyway --- gui/fitCommands/gui/localModule/add.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gui/fitCommands/gui/localModule/add.py b/gui/fitCommands/gui/localModule/add.py index ad233c84c..ae7bb6234 100644 --- a/gui/fitCommands/gui/localModule/add.py +++ b/gui/fitCommands/gui/localModule/add.py @@ -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