Configtool: don't pick up values which no longer exist.

Previously they were dropped only at save time, which is too late
for the GUI. This is mostly for robustness, the case where a
value was removed from config files, but not yet from the GUI.
This commit is contained in:
Markus Hitter 2015-07-14 23:31:03 +02:00
parent a07e5a7d1e
commit 88b813c4ba
2 changed files with 8 additions and 8 deletions

View File

@ -393,24 +393,24 @@ class BoardPanel(wx.Panel):
if m:
t = m.groups()
tt = re.findall(reDefQSm2, t[1])
if len(tt) == 1:
if len(tt) == 1 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = tt[0]
return True
elif len(tt) > 1:
elif len(tt) > 1 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = tt
return True
m = reDefineBL.search(ln)
if m:
t = m.groups()
if len(t) == 2:
if len(t) == 2 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = t[1]
return True
m = reDefBoolBL.search(ln)
if m:
t = m.groups()
if len(t) == 1:
if len(t) == 1 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = True
return True

View File

@ -308,24 +308,24 @@ class PrinterPanel(wx.Panel):
if m:
t = m.groups()
tt = re.findall(reDefQSm2, t[1])
if len(tt) == 1:
if len(tt) == 1 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = tt[0]
return True
elif len(tt) > 1:
elif len(tt) > 1 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = tt
return True
m = reDefineBL.search(ln)
if m:
t = m.groups()
if len(t) == 2:
if len(t) == 2 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = t[1]
return True
m = reDefBoolBL.search(ln)
if m:
t = m.groups()
if len(t) == 1:
if len(t) == 1 and (t[0] in self.cfgNames):
self.cfgValues[t[0]] = True
return True