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:
parent
6bed3fc4dd
commit
440ca82bca
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,4 +30,9 @@ SettingControl {
|
|||
anchors.topMargin: Style.margin
|
||||
width: root.width
|
||||
}
|
||||
|
||||
function setValue(newValue)
|
||||
{
|
||||
popup.currentIndex = newValue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue