Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/tasksmodel.cpp
Show First 20 Lines • Show All 546 Lines • ▼ Show 20 Line(s) | 542 | while (sortRowInsertQueue.count()) { | |||
---|---|---|---|---|---|
547 | 547 | | |||
548 | // Try to move the task up to its right-most app sibling, unless this | 548 | // Try to move the task up to its right-most app sibling, unless this | ||
549 | // is us sorting in a launcher list for the first time. | 549 | // is us sorting in a launcher list for the first time. | ||
550 | if (launchersEverSet && !idx.data(AbstractTasksModel::IsLauncher).toBool()) { | 550 | if (launchersEverSet && !idx.data(AbstractTasksModel::IsLauncher).toBool()) { | ||
551 | for (int i = (row - 1); i >= 0; --i) { | 551 | for (int i = (row - 1); i >= 0; --i) { | ||
552 | const QModelIndex &concatProxyIndex = concatProxyModel->index(sortedPreFilterRows.at(i), 0); | 552 | const QModelIndex &concatProxyIndex = concatProxyModel->index(sortedPreFilterRows.at(i), 0); | ||
553 | 553 | | |||
554 | if (appsMatch(concatProxyIndex, idx)) { | 554 | if (appsMatch(concatProxyIndex, idx)) { | ||
555 | // Our sort map contains row indices prior to any filtering, but we don't | ||||
556 | // want to sort new tasks in next to siblings we're filtering out higher up | ||||
557 | // in the proxy chain, so check in with the filter model. | ||||
558 | const QModelIndex &filterProxyIndex = filterProxyModel->mapFromSource(concatProxyIndex); | ||||
559 | | ||||
560 | if (filterProxyIndex.isValid()) { | ||||
555 | sortedPreFilterRows.move(row, i + 1); | 561 | sortedPreFilterRows.move(row, i + 1); | ||
broulik: Now it's no longer "Pre filter", is it? | |||||
sortedPreFilterRows is a list of pre-filter row indices we use for sorting. Moving its contents around doesn't change the fact that those contents are row indices from before filtering :) hein: `sortedPreFilterRows` is a list of pre-filter row indices we use for sorting. Moving its… | |||||
556 | moved = true; | 562 | moved = true; | ||
563 | } | ||||
557 | 564 | | |||
558 | break; | 565 | break; | ||
559 | } | 566 | } | ||
560 | } | 567 | } | ||
561 | } | 568 | } | ||
562 | 569 | | |||
563 | int insertPos = 0; | 570 | int insertPos = 0; | ||
564 | 571 | | |||
▲ Show 20 Lines • Show All 1235 Lines • Show Last 20 Lines |
Now it's no longer "Pre filter", is it?