Verified Commit c0403e6c authored by Fushan Wen's avatar Fushan Wen
Browse files

applets/taskmanager: Use `tasksModel.activeTask` in GroupDialog

We don't really use the binding, and simply use tasksModel.activeTask is
enough.
parent 886df4b3
......@@ -33,14 +33,12 @@ PlasmaCore.Dialog {
property alias overflowing: scrollView.overflowing
property var _oldAppletStatus: PlasmaCore.Types.UnknownStatus
property var activeTask: null
function findActiveTaskIndex() {
if (!activeTask) {
if (!tasksModel.activeTask) {
return;
}
for (let i = 0; i < groupListView.count; i++) {
if (tasksModel.makeModelIndex(visualParent.itemIndex, i) === activeTask) {
if (tasksModel.makeModelIndex(visualParent.itemIndex, i) === tasksModel.activeTask) {
groupListView.positionViewAtIndex(i, ListView.Contain); // Prevent visual glitches
groupListView.currentIndex = i;
return;
......
......@@ -184,19 +184,6 @@ MouseArea {
}
}
Connections {
target: tasksModel
function onActiveTaskChanged() {
if (!plasmoid.configuration.groupPopups) {
return;
}
if (tasksModel.activeTask.parent.valid) {
groupDialog.activeTask = tasksModel.activeTask;
}
}
}
TaskManager.VirtualDesktopInfo {
id: virtualDesktopInfo
}
......
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