diff --git a/gui/characterEditor.py b/gui/characterEditor.py index 3b89c7049..acac41dc2 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -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: diff --git a/gui/characterSelection.py b/gui/characterSelection.py index 532edb379..ea4afff01 100644 --- a/gui/characterSelection.py +++ b/gui/characterSelection.py @@ -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)