Updated builtinViewColumns.ammo to use CachingImageList.GetImageIndex

This commit is contained in:
HomeWorld
2010-12-07 14:42:25 +02:00
parent 0eda688351
commit 292b18b1a5

View File

@@ -27,7 +27,7 @@ class Ammo(ViewColumn):
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.mask = wx.LIST_MASK_IMAGE
self.imageId = fittingView.imageList.Add(bitmapLoader.getBitmap("damagePattern_small", "icons"))
self.imageId = fittingView.imageList.GetImageIndex("damagePattern_small", "icons")
def getText(self, stuff):
return "%s (%s)" % (stuff.charge.name, stuff.numCharges) if getattr(stuff, "charge", None) is not None else ""