From 8908a544371664e8840a11e50f4c5b92a02d3a59 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Mon, 6 Sep 2010 11:26:51 +0200 Subject: [PATCH] Also display group descriptions --- controller/character.py | 5 ++++- gui/characterEditor.py | 14 ++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/controller/character.py b/controller/character.py index ba5a460b1..b0d5eeaba 100644 --- a/controller/character.py +++ b/controller/character.py @@ -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 diff --git a/gui/characterEditor.py b/gui/characterEditor.py index 53e4413b4..fc94b3714 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -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):