More tweaks to getModifiedItemAttr and fix deprecation warning

This commit is contained in:
blitzmann
2017-11-05 01:51:05 -04:00
parent 3b0c8b6117
commit 6a382c4445
6 changed files with 21 additions and 28 deletions

View File

@@ -88,7 +88,7 @@ class MarketTree(wx.TreeCtrl):
for i in range(len(jumpList) - 1, -1, -1):
target = jumpList[i]
child, cookie = self.GetFirstChild(item)
while self.GetItemPyData(child) != target:
while self.GetItemData(child) != target:
child, cookie = self.GetNextChild(item, cookie)
item = child

View File

@@ -58,7 +58,7 @@ class MaxRange(ViewColumn):
if isinstance(stuff, Mode):
return ""
maxRange = stuff.maxRange if hasattr(stuff, "maxRange") else stuff.getModifiedItemAttr("maxRange")
maxRange = stuff.maxRange if hasattr(stuff, "maxRange") else stuff.getModifiedItemAttr("maxRange", None)
falloff = stuff.falloff
if falloff:
falloff = "+%sm" % formatAmount(falloff, 3, 0, 3)