From f9b890779841a99f8791e757049e1de0330e07a6 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 8 Oct 2010 21:45:48 +0300 Subject: [PATCH] Small fix in itemstats affected by - display counter on items/skills not on attributes --- gui/itemStats.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gui/itemStats.py b/gui/itemStats.py index 5d6b13418..998caa62a 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -420,16 +420,17 @@ class ItemAffectedBy (wx.Panel): else: color = wx.Colour(237, 243, 254) - index = self.effectList.InsertStringItem(sys.maxint, "%s" % cat) counter = 0 - self.effectList.SetItemBackgroundColour(index, color) for thing, attrs in things.iteritems(): if cat == thing.item.name: counter += 1 dattrs = attrs + + index = self.effectList.InsertStringItem(sys.maxint, "%s" % cat if counter == 1 else "%s x %d" % (cat,counter)) + self.effectList.SetItemBackgroundColour(index, color) if counter > 0: for cattr in dattrs: - self.effectList.InsertStringItem(sys.maxint, " %s %s" % (cattr, "" if counter == 1 else "x %d" % counter)) + self.effectList.InsertStringItem(sys.maxint, " %s" % cattr) # self.effectList.InsertStringItem(sys.maxint, "") self.Layout()