1
0
Fork 0

Launcher: fix a bug setting combo box state

Fix for callsign broke settings where the default value of setting is
not that of the control.
This commit is contained in:
James Turner 2020-04-10 19:09:54 +01:00
parent 6bed3fc4dd
commit 440ca82bca
2 changed files with 7 additions and 2 deletions

View file

@ -91,8 +91,8 @@ 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 !== defaultValue) {
//console.warn("restoring state for " + root.setting + ", got raw value " + rawValue + " with type " + typeof(rawValue))
if (rawValue !== undefined) {
setValue(rawValue);
}
}

View file

@ -30,4 +30,9 @@ SettingControl {
anchors.topMargin: Style.margin
width: root.width
}
function setValue(newValue)
{
popup.currentIndex = newValue;
}
}