From ce437184c1a2180133672497cec26174f52174d0 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 26 Jan 2011 11:00:04 +0200 Subject: [PATCH] Fixed an error popup message when trying to fetch skills with no character selected in character editor - api tab (by default select the first character) --- gui/characterEditor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index ad29c71c6..ce3d69776 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -612,12 +612,17 @@ class APIView (wx.Panel): for charName in list: self.charList.InsertStringItem(sys.maxint, charName) + self.charList.SetItemState(0,wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED) self.charList.SetColumnWidth(0, wx.LIST_AUTOSIZE_USEHEADER) self.charList.Show() + self.btnFetchCharList.Hide() self.btnFetchSkills.Show() + self.Layout() + self.charList.SetFocus() + def fetchSkills(self, event): item = self.charList.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) charName = self.charList.GetItemText(item)