Add all the columns we need for now to our fitting view
This commit is contained in:
@@ -30,9 +30,14 @@ class AttributeDisplay(ViewColumn):
|
||||
info = cAttribute.getAttributeInfo(params["attribute"])
|
||||
self.info = info
|
||||
if params["showIcon"]:
|
||||
iconFile = info.icon.iconFile if info.icon else None
|
||||
if info.name == "power":
|
||||
iconFile = "pg_small"
|
||||
iconType = "icons"
|
||||
else:
|
||||
iconFile = info.icon.iconFile if info.icon else None
|
||||
iconType = "pack"
|
||||
if iconFile:
|
||||
bitmap = bitmapLoader.getBitmap(iconFile, "pack")
|
||||
bitmap = bitmapLoader.getBitmap(iconFile, iconType)
|
||||
self.imageId = fittingView.imageList.Add(bitmap)
|
||||
else:
|
||||
self.imageId = -1
|
||||
@@ -43,7 +48,11 @@ class AttributeDisplay(ViewColumn):
|
||||
self.columnText = info.displayName if info.displayName != "" else info.name
|
||||
|
||||
def getText(self, mod):
|
||||
return "%.2f" % mod.getModifiedItemAttr(self.info.name)
|
||||
attr = mod.getModifiedItemAttr(self.info.name)
|
||||
if attr:
|
||||
return "%.2f" % attr
|
||||
else:
|
||||
return ""
|
||||
|
||||
def getImageId(self, mod):
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user