From d3698ead8c159027702e19843654938f2642b9c8 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Fri, 8 Oct 2010 21:25:30 +0200 Subject: [PATCH] Fix a small oversight (faulty if check) --- gui/itemStats.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/itemStats.py b/gui/itemStats.py index fee9bbecc..7ea1868db 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -398,13 +398,14 @@ class ItemAffectedBy (wx.Panel): for attrName in cont.iterAfflictions(): for fit, afflictors in cont.getAfflictions(attrName).iteritems(): for afflictor in afflictors: - if afflictor not in things: - things[afflictor.item.name] = [afflictor, 0, set()] + if afflictor.item.name not in things: + things[afflictor.item.name] = [afflictor, 1, set()] info = things[afflictor.item.name] - info[1] += 1 - info[2].add(attrName) + if info[0] != afflictor: + info[1] += 1 + info[2].add(attrName) for itemName, info in things.iteritems(): if wx.Platform in ['__WXGTK__', '__WXMSW__']: