Commit f573d6ec authored by David Redondo's avatar David Redondo 🏎
Browse files

Set index on completion instead of binding

On construction the binding is not reevaluated if the model changes
BUG:432018
FIXED-IN:5.21
parent c364382b
......@@ -67,11 +67,11 @@ Kirigami.Page {
}
QQC2.ComboBox{
model: SessionModel {}
currentIndex: Math.max(indexOfValue(kcm.sddmSettings.session), 0)
textRole: "name"
valueRole: "file"
onActivated: kcm.sddmSettings.session = currentValue
onEnabledChanged: enabled ? kcm.sddmSettings.session = currentValue : kcm.sddmSettings.session = ""
Component.onCompleted: currentIndex = Math.max(indexOfValue(kcm.sddmSettings.session), 0)
KCM.SettingStateBinding {
visible: autologinBox.checked
configObject: kcm.sddmSettings
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment