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:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user