Merge branch 'master' into market_metagroups

This commit is contained in:
DarkPhoenix
2019-03-22 02:02:17 +03:00
2 changed files with 5 additions and 2 deletions

View File

@@ -110,6 +110,9 @@ class BoosterView(d.Display):
self.origional = fit.boosters if fit is not None else None
self.boosters = stuff = fit.boosters[:] if fit is not None else None
if stuff is not None:
stuff.sort(key=lambda booster: booster.slot or 0)
if event.fitID != self.lastFitId:
self.lastFitId = event.fitID

View File

@@ -119,12 +119,12 @@ def exportEft(fit, options, callback):
if options[PortEftOptions.IMPLANTS]:
charSection = []
implantLines = []
for implant in fit.implants:
for implant in sorted(fit.implants, key=lambda i: i.slot or 0):
implantLines.append(implant.item.name)
if implantLines:
charSection.append('\n'.join(implantLines))
boosterLines = []
for booster in fit.boosters:
for booster in sorted(fit.boosters, key=lambda b: b.slot or 0):
boosterLines.append(booster.item.name)
if boosterLines:
charSection.append('\n'.join(boosterLines))