Commit c8358c20 authored by Eike Hein's avatar Eike Hein
Browse files

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:
parent 4500ff9d
......@@ -552,8 +552,15 @@ void TasksModel::Private::updateManualSortMap()
const QModelIndex &concatProxyIndex = concatProxyModel->index(, 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;
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