Fix descendent counter in TreeSearch
This commit is contained in:
parent
e68e0236e9
commit
6200f61162
|
@ -405,6 +405,7 @@ void TreeSearch::update_search(Tree *p_tree) {
|
|||
// clear and redraw if search was active recently.
|
||||
if (was_searched_recently) {
|
||||
_clear_filter();
|
||||
number_matches.clear();
|
||||
matching_entries.clear();
|
||||
was_searched_recently = false;
|
||||
p_tree->queue_redraw();
|
||||
|
|
|
@ -53,10 +53,13 @@ private:
|
|||
|
||||
// For TaskTree: These are updated when the tree is updated through TaskTree::_create_tree.
|
||||
Tree *tree_reference;
|
||||
|
||||
// linearized ordering of tree items.
|
||||
Vector<TreeItem *> ordered_tree_items;
|
||||
// entires that match the search mask.
|
||||
Vector<TreeItem *> matching_entries;
|
||||
// number of descendant matches for each tree item.
|
||||
HashMap<TreeItem *, int> number_matches;
|
||||
// custom draw-callbacks for each tree item.
|
||||
HashMap<TreeItem *, Callable> callable_cache;
|
||||
|
||||
bool was_searched_recently = false; // Performance
|
||||
|
|
Loading…
Reference in New Issue