only check states when first loading a fit from db
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user