Commit 4bf0358a authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Folder View Icons Config] Fix initial index of ComboBox

A while ago I optimized Plasma config dialogs to create the component with the cfg_ properties
already set. This code relied on the fact that mode changes initially.

Use Component.onCompleted now that we can and also use onActivated which only fires if the
index is explicitly changed by the user, not on imperative assignment.

Differential Revision:
parent 12e3ec43
......@@ -202,13 +202,8 @@ Item {
model: [i18n("Unsorted"), i18n("Name"), i18n("Size"), i18n("Type"), i18n("Date")]
onModeChanged: {
currentIndex = modeToIndex[mode];
onCurrentIndexChanged: {
mode = indexToMode[currentIndex];
Component.onCompleted: currentIndex = modeToIndex[mode]
onActivated: mode = indexToMode[index]
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