Add calls to bitmapLoader to the cachingImageList

This commit is contained in:
cncfanatics
2010-10-05 19:11:34 +02:00
parent a69a601666
commit 83ed4bdd44

View File

@@ -18,13 +18,15 @@
#===============================================================================
import wx
import bitmapLoader
class CachingImageList(wx.ImageList):
map = {}
def Add(self, bitmap):
id = self.map.get(id)
def Add(self, *loaderArgs):
id = self.map.get(loaderArgs)
if id is None:
bitmap = bitmapLoader.getBitmap(*loaderArgs)
id = wx.ImageList.Add(bitmap)
self.map[id] = bitmap
self.map[loaderArgs] = id
return id