diff --git a/service/fit.py b/service/fit.py index 085748e85..3761bfc09 100644 --- a/service/fit.py +++ b/service/fit.py @@ -261,6 +261,11 @@ class Fit(object): self.recalc(fit, withBoosters=True) fit.fill() + # Check that the states of all modules are valid + sFit = Fit.getInstance() + sFit.recalc(fit) + sFit.checkStates(fit, None) + eos.db.commit() fit.inited = True return fit diff --git a/service/port.py b/service/port.py index a1831ddb7..8f922ac8d 100644 --- a/service/port.py +++ b/service/port.py @@ -189,11 +189,6 @@ class Port(object): except: continue - # Check that the states of all modules are valid - sFit = service.Fit.getInstance() - sFit.recalc(f) - sFit.checkStates(f, None) - return f @staticmethod @@ -238,11 +233,6 @@ class Port(object): if m.isValidState(State.ACTIVE): m.state = State.ACTIVE - # Check that the states of all modules are valid - sFit = service.Fit.getInstance() - sFit.recalc(f) - sFit.checkStates(f, None) - return f @staticmethod @@ -353,11 +343,6 @@ class Port(object): c.amount = cargoMap[cargoName] fit.cargo.append(c) - # Check that there are no conflicts between active modules - sFit = service.Fit.getInstance() - sFit.recalc(fit) - sFit.checkStates(fit, None) - return fit @staticmethod @@ -508,11 +493,6 @@ class Port(object): if m.fits(f): f.modules.append(m) - # Check that there are no conflicts between active modules - sFit = service.Fit.getInstance() - sFit.recalc(f) - sFit.checkStates(f, None) - # Append fit to list of fits fits.append(f) @@ -578,11 +558,6 @@ class Port(object): except KeyboardInterrupt: continue - # Check that the states of all modules are valid - sFit = service.Fit.getInstance() - sFit.recalc(f) - sFit.checkStates(f, None) - fits.append(f) if callback: wx.CallAfter(callback, None)