Also display group descriptions

This commit is contained in:
cncfanatics
2010-09-06 11:26:51 +02:00
parent cacd310259
commit 8908a54437
2 changed files with 10 additions and 9 deletions

View File

@@ -46,5 +46,8 @@ class Character():
skills.append((skill.ID, skill.name))
return skills
def getDescription(self, itemID):
def getSkillDescription(self, itemID):
return eos.db.getItem(itemID).description
def getGroupDescription(self, groupID):
return eos.db.getMarketGroup(groupID).description

View File

@@ -101,7 +101,6 @@ class CharacterEditor (wx.Dialog):
self.Layout()
self.description.Hide()
self.descriptionBox.Hide()
self.Centre(wx.BOTH)
@@ -121,16 +120,15 @@ class CharacterEditor (wx.Dialog):
def updateDescription(self, event):
root = event.Item
tree = self.sview.SkillTreeCtrl
cChar = controller.Character.getInstance()
if tree.GetChildrenCount(root) == 0:
cChar = controller.Character.getInstance()
self.description.SetLabel(cChar.getDescription(tree.GetPyData(root)))
self.description.Wrap(620)
self.description.Show()
self.descriptionBox.Show()
description = cChar.getSkillDescription(tree.GetPyData(root))
else:
self.description.Hide()
self.descriptionBox.Hide()
description = cChar.getGroupDescription(tree.GetPyData(root))
self.description.SetLabel(description)
self.description.Wrap(620)
self.description.Show()
class NewCharacter (wx.Dialog):
def __init__(self, parent):