Don't consider filtered out tasks siblings when sorting in new tasks

Summary: BUG:396792

Reviewers: davidedmundson, broulik

Reviewed By: broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14392
wilder-5.14
Eike Hein 8 years ago
parent 4500ff9de1
commit c8358c203f
  1. 11
      libtaskmanager/tasksmodel.cpp

@ -552,8 +552,15 @@ void TasksModel::Private::updateManualSortMap()
const QModelIndex &concatProxyIndex = concatProxyModel->index(sortedPreFilterRows.at(i), 0);
if (appsMatch(concatProxyIndex, idx)) {
sortedPreFilterRows.move(row, i + 1);
moved = true;
// Our sort map contains row indices prior to any filtering, but we don't
// want to sort new tasks in next to siblings we're filtering out higher up
// in the proxy chain, so check in with the filter model.
const QModelIndex &filterProxyIndex = filterProxyModel->mapFromSource(concatProxyIndex);
if (filterProxyIndex.isValid()) {
sortedPreFilterRows.move(row, i + 1);
moved = true;
}
break;
}

Loading…
Cancel
Save