From c295482055c4518590312cb9f598bbba5493b8ea Mon Sep 17 00:00:00 2001 From: blitzmann Date: Thu, 3 Feb 2022 20:53:04 -0500 Subject: [PATCH] Fix for #2400 --- gui/fitCommands/calc/module/localReplace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/fitCommands/calc/module/localReplace.py b/gui/fitCommands/calc/module/localReplace.py index 83b277c51..b9d155f24 100644 --- a/gui/fitCommands/calc/module/localReplace.py +++ b/gui/fitCommands/calc/module/localReplace.py @@ -49,7 +49,6 @@ class CalcReplaceLocalModuleCommand(wx.Command): # relationship via .owner attribute, which is handled by SQLAlchemy eos.db.flush() sFit.recalc(fit) - self.savedStateCheckChanges = sFit.checkStates(fit, newMod) if not self.ignoreRestrictions and not newMod.fits(fit): pyfalog.warning('Module does not fit') self.Undo() @@ -62,6 +61,8 @@ class CalcReplaceLocalModuleCommand(wx.Command): pyfalog.warning('Invalid charge') self.Undo() return False + if self.recalc: + self.savedStateCheckChanges = sFit.checkStates(fit, newMod) return True def Undo(self):