From: Stefan Pluecken Date: Sun, 27 Nov 2005 21:33:44 +0000 (+0000) Subject: make configSelection circular X-Git-Tag: 2.6.0~4930 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/7bee809a45d982abe2bb7376f1e4420103ffc907 make configSelection circular --- diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 3328a168..0245a4f4 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -55,10 +55,9 @@ class configSelection: def checkValues(self): if self.parent.value < 0: - self.parent.value = 0 - - if(self.parent.value >= (len(self.parent.vals) - 1)): - self.parent.value = len(self.parent.vals) - 1 + self.parent.value = len(self.parent.vals) - 1 + elif(self.parent.value > (len(self.parent.vals) - 1)): + self.parent.value = 0 def cancel(self): self.parent.reload()