Configtool: don't ignore disabled values.
Previously, values of ignored keys simply got lost and were replaced with the ones from from the metadata file. Now this value is preserved and perhaps, some time in the future, we'll use this bit of information to to provide the right value when re-enabling it.
This commit is contained in:
parent
27cf051f03
commit
3795c7a36f
|
|
@ -394,17 +394,20 @@ class BoardPanel(wx.Panel):
|
|||
t = m.groups()
|
||||
tt = re.findall(reDefQSm2, t[1])
|
||||
if len(tt) == 1 and (t[0] in self.cfgNames):
|
||||
self.cfgValues[t[0]] = tt[0]
|
||||
self.cfgValues[t[0]] = tt[0], True
|
||||
return True
|
||||
elif len(tt) > 1 and (t[0] in self.cfgNames):
|
||||
self.cfgValues[t[0]] = tt
|
||||
self.cfgValues[t[0]] = tt, True
|
||||
return True
|
||||
|
||||
m = reDefineBL.search(ln)
|
||||
m = reDefine.search(ln)
|
||||
if m:
|
||||
t = m.groups()
|
||||
if len(t) == 2 and (t[0] in self.cfgNames):
|
||||
self.cfgValues[t[0]] = t[1]
|
||||
if reDefineBL.search(ln):
|
||||
self.cfgValues[t[0]] = t[1], True
|
||||
else:
|
||||
self.cfgValues[t[0]] = t[1], False
|
||||
return True
|
||||
|
||||
m = reDefBoolBL.search(ln)
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ class Page:
|
|||
return lsz
|
||||
|
||||
def setChoice(self, name, cfgValues, default):
|
||||
if name in cfgValues.keys():
|
||||
bv = cfgValues[name]
|
||||
if name in cfgValues.keys() and cfgValues[name][1] == True:
|
||||
bv = cfgValues[name][0]
|
||||
else:
|
||||
bv = default
|
||||
|
||||
|
|
@ -224,8 +224,8 @@ class Page:
|
|||
self.checkBoxes[k].SetValue(False)
|
||||
|
||||
for k in self.textControls.keys():
|
||||
if k in cfgValues.keys():
|
||||
self.textControls[k].SetValue(str(cfgValues[k]))
|
||||
if k in cfgValues.keys() and cfgValues[k][1] == True:
|
||||
self.textControls[k].SetValue(str(cfgValues[k][0]))
|
||||
else:
|
||||
self.textControls[k].SetValue("")
|
||||
|
||||
|
|
|
|||
|
|
@ -282,8 +282,8 @@ class PrinterPanel(wx.Panel):
|
|||
pg.setHelpText(self.helpText)
|
||||
|
||||
k = 'DC_EXTRUDER'
|
||||
if k in self.cfgValues.keys():
|
||||
self.pgMiscellaneous.setOriginalHeater(self.cfgValues[k])
|
||||
if k in self.cfgValues.keys() and self.cfgValues[k][1] == True:
|
||||
self.pgMiscellaneous.setOriginalHeater(self.cfgValues[k][0])
|
||||
else:
|
||||
self.pgMiscellaneous.setOriginalHeater(None)
|
||||
|
||||
|
|
@ -309,17 +309,20 @@ class PrinterPanel(wx.Panel):
|
|||
t = m.groups()
|
||||
tt = re.findall(reDefQSm2, t[1])
|
||||
if len(tt) == 1 and (t[0] in self.cfgNames):
|
||||
self.cfgValues[t[0]] = tt[0]
|
||||
self.cfgValues[t[0]] = tt[0], True
|
||||
return True
|
||||
elif len(tt) > 1 and (t[0] in self.cfgNames):
|
||||
self.cfgValues[t[0]] = tt
|
||||
self.cfgValues[t[0]] = tt, True
|
||||
return True
|
||||
|
||||
m = reDefineBL.search(ln)
|
||||
m = reDefine.search(ln)
|
||||
if m:
|
||||
t = m.groups()
|
||||
if len(t) == 2 and (t[0] in self.cfgNames):
|
||||
self.cfgValues[t[0]] = t[1]
|
||||
if reDefineBL.search(ln):
|
||||
self.cfgValues[t[0]] = t[1], True
|
||||
else:
|
||||
self.cfgValues[t[0]] = t[1], False
|
||||
return True
|
||||
|
||||
m = reDefBoolBL.search(ln)
|
||||
|
|
|
|||
Loading…
Reference in New Issue