Fix a bloody anoying bug with selecting a character as active, then

deleting it and then spawning the char editor again
This commit is contained in:
cncfanatics
2010-11-15 13:27:19 +01:00
parent 8fb9ef584c
commit 95652b6edd
2 changed files with 12 additions and 4 deletions

View File

@@ -68,15 +68,20 @@ class CharacterSelection(wx.Panel):
choice.Clear()
charList = cChar.getCharacterList()
cChar.getCharacterList()
picked = False
for id, name, active in charList:
currId = choice.Append(name, id)
if id == activeChar:
choice.SetSelection(currId)
elif activeChar is None and name == "All 0":
all0 = currId
picked = True
if activeChar is None:
choice.SetSelection(all0)
if not picked:
charID = cChar.all0ID()
self.selectChar(charID)
fitID = self.mainFrame.fitMultiSwitch.getActiveFit()
cFit = service.Fit.getInstance()
cFit.changeChar(fitID, charID)
if event is not None:
event.Skip()

View File

@@ -417,6 +417,9 @@ class Fit(object):
def changeChar(self, fitID, charID):
if fitID is None or charID is None:
if charID is not None:
self.character = Character.getInstance().all0()
return
fit = eos.db.getFit(fitID)