Fix a bug where clearing a tab would make stuff go BOOM

This commit is contained in:
cncfanatics
2010-08-28 21:41:47 +02:00
parent 1d8144f8fe
commit 4a3d6013ce
3 changed files with 11 additions and 7 deletions

View File

@@ -65,6 +65,9 @@ class Fit(object):
return newFit.ID
def getFit(self, fitID):
if fitID is None:
return None
fit = eos.db.getFit(fitID)
fit.fill()
return fit

2
eos

Submodule eos updated: c9a60088e7...8498a52426

View File

@@ -134,12 +134,13 @@ class FittingView(wx.ListCtrl):
modSlotMap = {}
slotOrder = [Slot.SUBSYSTEM, Slot.HIGH, Slot.MED, Slot.LOW, Slot.RIG]
for modid, mod in enumerate(fit.modules):
index = self.InsertStringItem(sys.maxint, "")
for i, col in enumerate(self.activeColumns):
self.SetStringItem(index, i, col.getText(mod), col.getImageId(mod))
self.SetItemData(index, modid)
modSlotMap[modid] = mod.slot
if fit is not None:
for modid, mod in enumerate(fit.modules):
index = self.InsertStringItem(sys.maxint, "")
for i, col in enumerate(self.activeColumns):
self.SetStringItem(index, i, col.getText(mod), col.getImageId(mod))
self.SetItemData(index, modid)
modSlotMap[modid] = mod.slot
for i, col in enumerate(self.activeColumns):
if not col.resized: