Commit 4c798115 authored by David Edmundson's avatar David Edmundson

Merge branch 'Plasma/5.9'

parents cc572049 e5df3ded
......@@ -342,8 +342,7 @@ PlasmaComponents.ContextMenu {
menuItem.checked = Qt.binding(function() {
return menu.visualParent && menu.get(atm.Activities).length === 0;
});
menuItem.clicked.connect(function() {
var checked = menuItem.checked;
menuItem.toggled.connect(function(checked) {
var newActivities = undefined; // will cast to an empty QStringList i.e all activities
if (!checked) {
newActivities = new Array(activityInfo.currentActivity);
......@@ -365,9 +364,8 @@ PlasmaComponents.ContextMenu {
return menu.visualParent && menu.get(atm.Activities).indexOf(activityId) >= 0;
};
})(activityId));
menuItem.clicked.connect((function(activityId) {
return function () {
var checked = menuItem.checked;
menuItem.toggled.connect((function(activityId) {
return function (checked) {
var newActivities = menu.get(atm.Activities);
if (checked) {
newActivities = newActivities.concat(activityId);
......@@ -376,7 +374,8 @@ PlasmaComponents.ContextMenu {
if (index < 0) {
return;
}
newActivities = newActivities.splice(index, 1);
newActivities.splice(index, 1);
}
return tasksModel.requestActivities(menu.modelIndex, newActivities);
};
......
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