diff --git a/gui/fitCommands/calc/module/localChangeStates.py b/gui/fitCommands/calc/module/localChangeStates.py index 0f7161632..da7215604 100644 --- a/gui/fitCommands/calc/module/localChangeStates.py +++ b/gui/fitCommands/calc/module/localChangeStates.py @@ -61,6 +61,6 @@ class CalcChangeLocalModuleStatesCommand(wx.Command): mod = fit.modules[position] pyfalog.debug('Reverting {} to state {} for fit ID {}'.format(mod, state, self.fitID)) mod.state = state - restoreCheckedStates(fit, self.savedStateCheckChanges) + restoreCheckedStates(fit, self.savedStateCheckChanges, ignoreModPoss=self.savedStates) eos.db.commit() return True diff --git a/gui/fitCommands/helpers.py b/gui/fitCommands/helpers.py index a551490e8..0e55f2901 100644 --- a/gui/fitCommands/helpers.py +++ b/gui/fitCommands/helpers.py @@ -332,11 +332,13 @@ def droneStackLimit(fit, itemIdentity): return limit -def restoreCheckedStates(fit, stateInfo): +def restoreCheckedStates(fit, stateInfo, ignoreModPoss=()): if stateInfo is None: return changedMods, changedProjMods, changedProjDrones = stateInfo for pos, state in changedMods.items(): + if pos in ignoreModPoss: + continue fit.modules[pos].state = state for pos, state in changedProjMods.items(): fit.projectedModules[pos].state = state