Show addition of negative amount as subtraction
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user