diff --git a/eos/saveddata/character.py b/eos/saveddata/character.py index 1c04a45d5..4622875ba 100644 --- a/eos/saveddata/character.py +++ b/eos/saveddata/character.py @@ -218,8 +218,12 @@ class Character(object): def isDirty(self): return len(self.dirtySkills) > 0 + @property + def ro(self): + return self == self.getAll5() or self == self.getAll0() + def saveLevels(self): - if self == self.getAll5() or self == self.getAll0(): + if self.ro: raise ReadOnlyException("This character is read-only") for skill in self.dirtySkills.copy(): diff --git a/gui/characterEditor.py b/gui/characterEditor.py index c7862e817..6cd5d6761 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -93,7 +93,7 @@ class CharacterEntityEditor(EntityEditor): def getEntitiesFromContext(self): sChar = Character.getInstance() - charList = sorted(sChar.getCharacterList(), key=lambda c: c.name) + charList = sorted(sChar.getCharacterList(), key=lambda c: (not c.ro, c.name)) # Do some processing to ensure that we have All 0 and All 5 at the top all5 = sChar.all5() diff --git a/gui/characterSelection.py b/gui/characterSelection.py index e27fd62e2..13df550e8 100644 --- a/gui/characterSelection.py +++ b/gui/characterSelection.py @@ -125,7 +125,7 @@ class CharacterSelection(wx.Panel): activeChar = self.getActiveCharacter() choice.Clear() - charList = sChar.getCharacterList() + charList = sorted(sChar.getCharacterList(), key=lambda c: (not c.ro, c.name)) picked = False for char in charList: