From f92b518ef78423aff17974d91f9666f0f98b2aeb Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Tue, 25 Oct 2011 22:31:58 +0300 Subject: [PATCH] Show an empty icon (transparent 16x16) in item stats if an attribute icon is missing from static data or things are screwed up (take 2) --- gui/itemStats.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/itemStats.py b/gui/itemStats.py index b2b648468..cf98874b0 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -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: