Fix a bug with the character selection, and automatically assign a character after logging into eve via character editor

This commit is contained in:
Ryan Holmes
2018-03-15 22:13:56 -04:00
parent 8153b80d05
commit 570df7f645
2 changed files with 8 additions and 1 deletions

View File

@@ -808,6 +808,11 @@ class APIView(wx.Panel):
sEsi = Esi.getInstance()
activeChar = self.charEditor.entityEditor.getActiveEntity()
if event and event.EventType == GE.EVT_SSO_LOGIN.typeId and hasattr(event, 'character'):
# Automatically assign the character that was just logged into
sChar.setSsoCharacter(activeChar.ID, event.character.ID)
sso = sChar.getSsoCharacter(activeChar.ID)
ssoChars = sEsi.getSsoCharacters()
@@ -823,6 +828,8 @@ class APIView(wx.Panel):
self.charChoice.SetSelection(currId)
if sso is None:
self.charChoice.SetSelection(noneID)
#
# if chars:
# for charName in chars:

View File

@@ -178,7 +178,7 @@ class CharacterSelection(wx.Panel):
return
char = sChar.getCharacter(charID)
if sChar.getCharName(charID) not in ("All 0", "All 5") and char.ssoCharacterID is not None:
if sChar.getCharName(charID) not in ("All 0", "All 5") and sChar.getSsoCharacter(char.ID) is not None:
self.btnRefresh.Enable(True)
else:
self.btnRefresh.Enable(False)