Show addition of negative amount as subtraction

This commit is contained in:
DarkPhoenix
2019-08-01 23:46:40 +03:00
parent 8591f649d1
commit 9f6f5c8a76

View File

@@ -283,6 +283,10 @@ class ItemAffectedBy(wx.Panel):
penalized += "(resisted)"
attrModifier = "*"
if attrModifier == "+" and attrAmount < 0:
attrModifier = "-"
attrAmount = -attrAmount
# this is the Module node, the attribute will be attached to this
display = "%s %s %.2f %s" % (displayStr, attrModifier, attrAmount, penalized)
treeItem = self.affectedBy.AppendItem(child, display, itemIcon)
@@ -415,6 +419,10 @@ class ItemAffectedBy(wx.Panel):
penalized += "(resisted)"
attrModifier = "*"
if attrModifier == "+" and attrAmount < 0:
attrModifier = "-"
attrAmount = -attrAmount
attributes.append((attrName, (displayName if displayName != "" else attrName), attrModifier,
attrAmount, penalized, attrIcon))