QMod: stage2

This commit is contained in:
HomeWorld
2010-10-29 04:19:48 +03:00
parent 6216621a67
commit b5a6fb5e13

View File

@@ -124,8 +124,8 @@ class ShipBrowser(wx.Panel):
sMarket = service.Market.getInstance() sMarket = service.Market.getInstance()
sFit = service.Fit.getInstance() sFit = service.Fit.getInstance()
self.lpane.RemoveAllChildren() self.lpane.RemoveAllChildren()
content = self.stage2Cache.get(categoryID,None)
if categoryID not in self.stage2Cache: if not content:
content = [] content = []
shipList = sMarket.getShipList(categoryID) shipList = sMarket.getShipList(categoryID)
shipList.sort(key=self.raceNameKey) shipList.sort(key=self.raceNameKey)
@@ -136,7 +136,7 @@ class ShipBrowser(wx.Panel):
self.stage2Cache[categoryID]= content self.stage2Cache[categoryID]= content
else: else:
count = 0 count = 0
for ID,name,fits,race in self.stage2Cache[categoryID]: for ID,name,fits,race in content:
dbfits = len(sFit.getFitsWithShip(ID)) dbfits = len(sFit.getFitsWithShip(ID))
if dbfits != fits: if dbfits != fits:
fits = dbfits fits = dbfits