1
0
Fork 0

Launcher: fix a glitch in restoring callsign

The base version of setValue used the wrong syntax, causing callsign
restoring to fail.
This commit is contained in:
James Turner 2020-04-10 11:58:18 +01:00
parent 0a6fe33bc3
commit 4fd59a6613

View file

@ -90,8 +90,9 @@ Item {
var defaultValue = ("defaultValue" in root) ? root.defaultValue : undefined; var defaultValue = ("defaultValue" in root) ? root.defaultValue : undefined;
var rawValue = _config.getValueForKey("", root.setting, defaultValue); var rawValue = _config.getValueForKey("", root.setting, defaultValue);
// console.warn("restoring state for " + root.setting + ", got raw value " + rawValue + " with type " + typeof(rawValue))
if (rawValue !== undefined) { // console.warn("restoring state for " + root.setting + ", got raw value " + rawValue + " with type " + typeof(rawValue))
if (rawValue !== defaultValue) {
setValue(rawValue); setValue(rawValue);
} }
} }
@ -99,6 +100,6 @@ Item {
function setValue(newValue) function setValue(newValue)
{ {
// hook method so controls can override // hook method so controls can override
this.value = newValue root.value = newValue
} }
} }