Fix issue with ship filter which didn't follow market overrides

It bugged out if you have some limited edition ships. E.g. if you have malice fit and no other AF fits, when you enable filter it hid limited edition group but showed AF group
This commit is contained in:
DarkPhoenix
2019-03-20 12:12:51 +03:00
parent e8af636831
commit 86459faf76

View File

@@ -168,9 +168,8 @@ class ShipBrowser(wx.Panel):
# set map & cache of fittings per category
for cat in self.categoryList:
itemIDs = [x.ID for x in cat.items]
itemIDs = [x.ID for x in sMkt.getItemsByGroup(cat)]
self.categoryFitCache[cat.ID] = sum([count for shipID, count in counts if shipID in itemIDs]) > 0
for ship in self.categoryList:
if self.filterShipsWithNoFits and not self.categoryFitCache[ship.ID]:
continue