Do not display capacitor use column on 0

A long column of 0's is annoying. Don't display it if it's 0.
This commit is contained in:
Corollax
2010-11-01 14:41:04 -05:00
parent 17e2a91bab
commit b4525d233e

View File

@@ -37,7 +37,7 @@ class CapacitorUse(ViewColumn):
def getText(self, mod):
capUse = mod.capUse
if capUse is not None:
if capUse:
return "%s%s" % ("+" if capUse < 0 else "", (formatAmount(-capUse, 3, 0, 3)))
else:
return ""