Commit 42fb1de1 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Containment Actions Configuration] Fix changing plugin

The index argument of the activated signal shadows the index context property of the Repeater

Differential Revision: https://phabricator.kde.org/D18840
parent 68350009
......@@ -94,6 +94,8 @@ Item {
QtControls.ComboBox {
id: pluginsCombo
// "index" argument of onActivated shadows the model index
readonly property int pluginIndex: index
Layout.fillWidth: true
Layout.column: 1
Layout.row: index
......@@ -115,8 +117,11 @@ Item {
pluginsCombo.initialized = true;
}
onActivated: {
if (initialized && configDialog.containmentActionConfigModel.get(currentIndex).pluginName != pluginName) {
configDialog.currentContainmentActionsModel.update(index, action, configDialog.containmentActionConfigModel.get(currentIndex).pluginName);
if (initialized) {
var newPluginName = configDialog.containmentActionConfigModel.get(index).pluginName;
if (newPluginName != pluginName) {
configDialog.currentContainmentActionsModel.update(pluginIndex, action, newPluginName);
}
}
}
}
......
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