From 67e8a7bf868725c2d6fec00675dc5320bbbeb6ff Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Sat, 8 Oct 2005 02:10:36 +0000 Subject: [PATCH] add invalidate after reload() used for cancel --- lib/python/Components/config.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 72bc7beb..7f8f5072 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -89,9 +89,6 @@ class configSatlist: if(self.parent.value >= (len(self.parent.vals) - 1)): self.parent.value = len(self.parent.vals) - 1 - print "value" + str(self.parent.value) - print "name " + self.parent.vals[self.parent.value][0] - def cancel(self): self.parent.reload() @@ -255,16 +252,13 @@ class configElement: tcnt = -1; #for defaultval for x in self.vals: if int(x[1]) == int(data): - print "return entry" return cnt if int(x[1]) == int(self.defaultValue): tcnt = cnt cnt += 1 if tcnt != -1: - print "return default" return tcnt - print "return fix" - return 0 + return 0 #prevent bigger then array def datafromFile(self, control, data): if control == ConfigSlider: @@ -297,7 +291,6 @@ class configElement: # value += str(i) return value elif control == configSatlist: - print "value is " + str(self.value) return str(self.vals[self.value][1]); else: return "" @@ -308,8 +301,6 @@ class configElement: except: value = "" - print "get value " + str(value) - if value == "": print "value not found - using default" @@ -321,6 +312,9 @@ class configElement: self.save() #add missing value to dict else: self.value = value + + #is this right? activate settings after load/cancel and use default + self.change() def __init__(self, configPath, control, defaultValue, vals): self.configPath = configPath -- 2.30.2