Merge branch 'master' into singularity

This commit is contained in:
DarkPhoenix
2014-06-03 00:36:13 +04:00
3 changed files with 32 additions and 19 deletions

View File

@@ -93,9 +93,9 @@ class Fit(object):
"defaultCharacter": self.character.ID,
"useGlobalForceReload": False,
"colorFitBySlot": False,
"rackSlots": False,
"rackLabels": False,
"compactSkills": False}
"rackSlots": True,
"rackLabels": True,
"compactSkills": True}
self.serviceFittingOptions = SettingsProvider.getInstance().getSettings(
"pyfaServiceFittingOptions", serviceFittingDefaultOptions)
@@ -220,7 +220,11 @@ class Fit(object):
eos.db.commit()
self.recalc(fit, withBoosters=True)
def getFit(self, fitID):
def getFit(self, fitID, projected = False):
''' Gets fit from database, and populates fleet data.
Projected is a recursion flag that is set to reduce recursions into projected fits
'''
if fitID is None:
return None
fit = eos.db.getFit(fitID)
@@ -233,8 +237,13 @@ class Fit(object):
fit.fleet = None
else:
fit.fleet = f
self.recalc(fit, withBoosters=True)
fit.fill()
if not projected:
for fitP in fit.projectedFits:
self.getFit(fitP.ID, projected = True)
self.recalc(fit, withBoosters=True)
fit.fill()
eos.db.commit()
fit.inited = True
return fit