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:
blitzmann
2018-05-31 21:13:12 -04:00
parent ff1d8109cd
commit 5388ba7a70
1030 changed files with 49 additions and 96 deletions

View File

@@ -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:

View File

@@ -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)

View File

@@ -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:

View File

@@ -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")

View File

@@ -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)