Fix dirty skill indicator (* instead of blue text). Need to get a different icon working for those. Remove debugging prints()

This commit is contained in:
blitzmann
2017-11-16 01:20:38 -05:00
parent ce8f1d385d
commit e848cec815
3 changed files with 14 additions and 25 deletions

View File

@@ -24,8 +24,6 @@ prefix = __name__ + "."
# (should find all filters in normal build, but not pyinstaller)
module_names = [m[1] for m in pkgutil.iter_modules(__path__, prefix)]
print ("module names from iter_modules: ", module_names)
# special handling for PyInstaller
importers = map(pkgutil.get_importer, __path__)
toc = set()
@@ -37,10 +35,7 @@ for elm in toc:
if elm.startswith(prefix):
module_names.append(elm)
print("module names after get_importer toc: ", module_names)
for modname in module_names:
print(modname)
# loop through python files, extracting update number and function, and
# adding it to a list
modname_tail = modname.rsplit('.', 1)[-1]

View File

@@ -420,12 +420,13 @@ class SkillTreeView(wx.Panel):
for id, name in sChar.getSkillsByName(search):
iconId = self.skillBookImageId
childId = tree.AppendItem(root, name, iconId, data=('skill', id))
level, dirty = sChar.getSkillLevel(char.ID, id)
if dirty:
name = "* " + name
childId = tree.AppendItem(root, name, iconId, data=('skill', id))
tree.SetItemText(childId, 1, "Level %d" % int(level) if isinstance(level, float) else level)
# @todo: pheonix
# if dirty:
# tree.SetItemTextColour(childId, wx.BLUE)
def populateSkillTree(self, event=None):
sChar = Character.getInstance()
@@ -446,11 +447,11 @@ class SkillTreeView(wx.Panel):
tree.DeleteAllItems()
for id, name in groups:
if id in dirtyGroups:
name = "* " + name
childId = tree.AppendItem(root, name, imageId, data=('group', id))
tree.AppendItem(childId, "dummy")
# @todo: pheonix
# if id in dirtyGroups:
# tree.(childId, wx.BLUE)
if event:
event.Skip()
@@ -468,13 +469,14 @@ class SkillTreeView(wx.Panel):
data = tree.GetItemData(root)
for id, name in sChar.getSkills(data[1]):
iconId = self.skillBookImageId
childId = tree.AppendItem(root, name, iconId, data=('skill', id))
level, dirty = sChar.getSkillLevel(char.ID, id)
tree.SetItemText(childId, 1, "Level %d" % int(level) if isinstance(level, float) else level)
# @todo: pheonix
# if dirty:
# tree.SetItemTextColour(childId, wx.BLUE)
if dirty:
name = "* " + name
childId = tree.AppendItem(root, name, iconId, data=('skill', id))
tree.SetItemText(childId, 1, "Level %d" % int(level) if isinstance(level, float) else level)
def scheduleMenu(self, event):
event.Skip()

View File

@@ -9,15 +9,12 @@ elsewhere (in which case can be accessed with packs[name])
import pkgutil
# init parent dict
all = {}
# init container to store the separate conversion packs in case we need them
packs = {}
prefix = __name__ + "."
# load modules to work based with and without pyinstaller
@@ -28,8 +25,6 @@ prefix = __name__ + "."
# (should find all filters in normal build, but not pyinstaller)
module_names = [m[1] for m in pkgutil.iter_modules(__path__, prefix)]
print ("module names from iter_modules: ", module_names)
# special handling for PyInstaller
importers = map(pkgutil.get_importer, __path__)
toc = set()
@@ -41,10 +36,7 @@ for elm in toc:
if elm.startswith(prefix):
module_names.append(elm)
print("module names after get_importer toc: ", module_names)
for modname in module_names:
print (modname)
conversionPack = __import__(modname, fromlist="dummy")
all.update(conversionPack.CONVERSIONS)
modname_tail = modname.rsplit('.', 1)[-1]