Show an empty icon (transparent 16x16) in item stats if an attribute icon is missing from static data or things are screwed up

This commit is contained in:
HomeWorld
2011-10-25 22:17:35 +03:00
parent a8db586696
commit 4560533b2a
2 changed files with 7 additions and 2 deletions

View File

@@ -302,7 +302,12 @@ class ItemParams (wx.Panel):
if info:
if info.icon is not None:
iconFile = info.icon.iconFile
attrIcon = self.imageList.Add(bitmapLoader.getBitmap(iconFile, "pack"))
icon = bitmapLoader.getBitmap(iconFile, "pack")
if icon is None:
icon = bitmapLoader.getBitmap("transparent16x16", "icons")
attrIcon = self.imageList.Add( icon )
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
else: