Created first iteration of "Recent Fits" view, in which a nav button is interacted with to show a list of the 100 most recently modified fits. Ship Broswer is littered with ToggleRecentShips() to reset the icon when not in "recent" mode. This should probably be fixed at some point.

Removed the FIT_CHANGED binding from FitItem - this was causing very odd issues when the object was destroyed (navigating to another "stage") such as the Fit Changed event for that fit no longer firing (or at least seemingly so)

To fix this, simply look at the active fit during FitItem.Refresh()

Also creates a new query to get a list of items from the DB, although it's not used (was gonna use it, decided against it, but didn't want to delete the code - could prove handy later)
This commit is contained in:
blitzmann
2017-04-23 20:20:04 -04:00
parent bb73065b43
commit 32f417ce5a
8 changed files with 149 additions and 36 deletions

View File

@@ -98,6 +98,20 @@ class Fit(object):
return names
@staticmethod
def getRecentFits():
""" Fetches recently modified fits, used with shipBrowser """
pyfalog.debug("Fetching recent fits")
fits = eos.db.getRecentFits()
returnInfo = []
for fit in fits:
item = eos.db.getItem(fit[1])
returnInfo.append((fit[0], fit[2], fit[3] or fit[4] or datetime.datetime.fromtimestamp(fit[5]), item))
# ID name timestamps
return returnInfo
@staticmethod
def getFitsWithModules(typeIDs):
""" Lists fits flagged as booster """