From 4fd59a66138e9754c0a3e817c5cf7c7b26be0b8e Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 10 Apr 2020 11:58:18 +0100 Subject: [PATCH] Launcher: fix a glitch in restoring callsign The base version of setValue used the wrong syntax, causing callsign restoring to fail. --- src/GUI/qml/SettingControl.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/GUI/qml/SettingControl.qml b/src/GUI/qml/SettingControl.qml index e469340dd..a17304c03 100644 --- a/src/GUI/qml/SettingControl.qml +++ b/src/GUI/qml/SettingControl.qml @@ -90,8 +90,9 @@ Item { var defaultValue = ("defaultValue" in root) ? root.defaultValue : undefined; 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); } } @@ -99,6 +100,6 @@ Item { function setValue(newValue) { // hook method so controls can override - this.value = newValue + root.value = newValue } }