Remove need for Icon class, references to it's DB relationship, and remove from DB. Also, add the files. All the files.
This commit is contained in:
@@ -43,7 +43,7 @@ class AmmoIcon(ViewColumn):
|
||||
if stuff.charge is None:
|
||||
return -1
|
||||
else:
|
||||
iconFile = stuff.charge.icon.iconFile if stuff.charge.icon else ""
|
||||
iconFile = stuff.charge.iconID if stuff.charge.icon else ""
|
||||
if iconFile:
|
||||
return self.fittingView.imageList.GetImageIndex(iconFile, "icons")
|
||||
else:
|
||||
|
||||
@@ -41,7 +41,7 @@ class AttributeDisplay(ViewColumn):
|
||||
iconFile = "pg_small"
|
||||
iconType = "gui"
|
||||
else:
|
||||
iconFile = info.icon.iconFile if info.icon else None
|
||||
iconFile = info.iconID
|
||||
iconType = "icons"
|
||||
if iconFile:
|
||||
self.imageId = fittingView.imageList.GetImageIndex(iconFile, iconType)
|
||||
|
||||
@@ -35,10 +35,10 @@ class BaseIcon(ViewColumn):
|
||||
return self.fittingView.imageList.GetImageIndex("slot_%s_small" % Slot.getName(stuff.slot).lower(),
|
||||
"gui")
|
||||
else:
|
||||
return self.loadIconFile(stuff.item.icon.iconFile if stuff.item.icon else "")
|
||||
return self.loadIconFile(stuff.item.iconID or "")
|
||||
|
||||
item = getattr(stuff, "item", stuff)
|
||||
return self.loadIconFile(item.icon.iconFile if item.icon else "")
|
||||
return self.loadIconFile(item.iconID)
|
||||
|
||||
def loadIconFile(self, iconFile):
|
||||
if iconFile:
|
||||
|
||||
@@ -40,7 +40,7 @@ class MaxRange(ViewColumn):
|
||||
info = sAttr.getAttributeInfo("maxRange")
|
||||
self.info = info
|
||||
if params["showIcon"]:
|
||||
iconFile = info.icon.iconFile if info.icon else None
|
||||
iconFile = info.iconID
|
||||
if iconFile:
|
||||
self.imageId = fittingView.imageList.GetImageIndex(iconFile, "icons")
|
||||
self.bitmap = BitmapLoader.getBitmap(iconFile, "icons")
|
||||
|
||||
@@ -41,7 +41,7 @@ class PropertyDisplay(ViewColumn):
|
||||
iconFile = "pg_small"
|
||||
iconType = "gui"
|
||||
else:
|
||||
iconFile = info.icon.iconFile if info.icon else None
|
||||
iconFile = info.iconID if info.icon else None
|
||||
iconType = "icons"
|
||||
if iconFile:
|
||||
self.imageId = fittingView.imageList.GetImageIndex(iconFile, iconType)
|
||||
|
||||
Reference in New Issue
Block a user