Use CachingImageList.GetImageIndex for bitmaps that resides on FS, let wx.ImageList.Add deal with the rest (memory bitmaps)
This commit is contained in:
@@ -25,7 +25,7 @@ class CachingImageList(wx.ImageList):
|
||||
wx.ImageList.__init__(self, width, height)
|
||||
self.map = {}
|
||||
|
||||
def Add(self, *loaderArgs):
|
||||
def GetImageIndex(self, *loaderArgs):
|
||||
id = self.map.get(loaderArgs)
|
||||
if id is None:
|
||||
bitmap = bitmapLoader.getBitmap(*loaderArgs)
|
||||
|
||||
Reference in New Issue
Block a user