Commit e8a99403 authored by David Redondo's avatar David Redondo 🏎
Browse files

Show child processes if we match the parent

In the process tree also show children if the we match the parent.
This is somewhat the opposite of recursive filtering ("show parent if a
child is shown"). Example:
 A
 |-B
 | |-D
 | |-E
 |-C
Currently if you search for "E", A, B and E will be shown, this is not
changed by this commit and the effect of the recursive filtering.
But if the filter is "B", only A and B will be shown.
With this commit A, B, D and E are shown.
parent 9c2d8b76
......@@ -84,6 +84,11 @@ bool ProcessSortFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &
result = QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent);
}
// Show regardless if an ancestor matches, this is kinda the inverse of recursiveFilteringEnabled
if (!result && sourceParent.parent().isValid()) {
result = filterAcceptsRow(sourceParent.row(), sourceParent.parent());
}
return result;
}
......
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