Remember settings for session log, auto-refresh timeline, and check valid settings

This commit is contained in:
Veronica K. B. Olsen
2019-10-22 19:56:56 +02:00
parent bbdf1aa8e1
commit 598eaa8c3c
4 changed files with 91 additions and 12 deletions
+12
View File
@@ -76,4 +76,16 @@ class OptLastState():
return checkInt(self.theState[setName],self.theState[setName],False)
return None
def validIntRange(self, theValue, intA, intB, intDefault):
if isinstance(theValue, int):
if theValue >= intA and theValue <= intB:
return theValue
return intDefault
def validIntTuple(self, theValue, theTuple, intDefault):
if isinstance(theValue, int):
if theValue in theTuple:
return theValue
return intDefault
# END Class OptLastState