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