Allow all 5 and 0 to change skills from affecting skill menu

This commit is contained in:
blitzmann
2015-09-14 20:35:36 -04:00
parent f2b4400834
commit bd53785667
3 changed files with 9 additions and 2 deletions

View File

@@ -155,8 +155,12 @@ class Character(object):
return len(self.dirtySkills) > 0
def saveLevels(self):
if self == self.getAll5() or self == self.getAll0():
raise ReadOnlyException("This character is read-only")
for skill in self.dirtySkills:
skill.saveLevel()
self.dirtySkills = set()
eos.db.commit()

View File

@@ -21,8 +21,8 @@ class ChangeAffectingSkills(ContextMenu):
self.charID = fit.character.ID
if self.sChar.getCharName(self.charID) in ("All 0", "All 5"):
return False
#if self.sChar.getCharName(self.charID) in ("All 0", "All 5"):
# return False
if srcContext == "fittingShip":
fitID = self.mainFrame.getActiveFit()

View File

@@ -193,6 +193,9 @@ class Character(object):
return char
def saveCharacter(self, charID):
"""Save edited skills"""
if charID == self.all5ID() or charID == self.all0ID():
return
char = eos.db.getCharacter(charID)
char.saveLevels()