Commit cbdecba9 authored by kempe's avatar kempe

Select correct player layout in settings

parent 31604772
......@@ -20,15 +20,26 @@ SettingsPageForm {
onPlayerLayoutChanged: {
settings.setValue("playerLayout", fileName)
console.log("Changing layout to", fileName)
console.debug("Changing layout to", fileName)
}
Component.onCompleted: {
// Select correct Api language
for (var i = 0; i < apiLanguageModel.count; i++) {
var item = apiLanguageModel.get(i)
if (settings.value("apiUrl") === item.apiUrl) {
apiLanguageComboBox.currentIndex = i;
}
}
// Select correct player layout
for (var i = 0; i < playerLayoutModel.count; i++) {
var item = playerLayoutModel.get(i)
if (settings.value("playerLayout") === item.fileName) {
playerLayoutComboBox.currentIndex = i;
}
}
playerLayoutChanged.connect(window.playerLayoutUpdated)
}
}
......@@ -10,6 +10,8 @@ Page {
property alias aboutAction: aboutAction
property alias buttonResetDb: buttonResetDb
property alias playerLayoutComboBox: playerLayoutComboBox
property alias playerLayoutModel: playerLayoutModel
property alias apiLanguageComboBox: apiLanguageComboBox
property alias apiLanguageModel: apiLanguageModel
......
Markdown is supported
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