Made factor in reload time global option behave

This commit is contained in:
HomeWorld
2011-12-23 11:11:36 +02:00
parent 4cf47fb7c6
commit 6365810a86
3 changed files with 15 additions and 3 deletions

View File

@@ -665,7 +665,17 @@ class Fit(object):
else:
return currState
def refreshFit(self, fitID):
if fitID is None:
return None
fit = eos.db.getFit(fitID)
eos.db.commit()
self.recalc(fit)
def recalc(self, fit, withBoosters=False):
if fit.factorReload is not self.serviceFittingOptions["useGlobalForceReload"]:
fit.factorReload = self.serviceFittingOptions["useGlobalForceReload"]
eos.db.commit()
fit.clear()
fit.forceReload = self.serviceFittingOptions["useGlobalForceReload"]
fit.calculateModifiedAttributes(withBoosters=withBoosters, dirtyStorage=self.dirtyFitIDs)