Fix optimization through which the parent count is not drawn
This commit is contained in:
parent
5a66160bce
commit
585d9663d6
|
@ -93,8 +93,9 @@ void TreeSearch::_clear_filter() {
|
||||||
|
|
||||||
void TreeSearch::_highlight_tree() {
|
void TreeSearch::_highlight_tree() {
|
||||||
ERR_FAIL_COND(!tree_reference);
|
ERR_FAIL_COND(!tree_reference);
|
||||||
for (int i = 0; i < matching_entries.size(); i++) {
|
// This might not be the prettiest, but it is the most efficient solution probably.
|
||||||
TreeItem *tree_item = matching_entries[i];
|
for (HashMap<TreeItem *, int>::Iterator it = number_matches.begin(); it != number_matches.end(); ++it) {
|
||||||
|
TreeItem *tree_item = it->key;
|
||||||
_highlight_tree_item(tree_item);
|
_highlight_tree_item(tree_item);
|
||||||
}
|
}
|
||||||
tree_reference->queue_redraw();
|
tree_reference->queue_redraw();
|
||||||
|
|
|
@ -56,6 +56,7 @@ private:
|
||||||
// linearized ordering of tree items.
|
// linearized ordering of tree items.
|
||||||
Vector<TreeItem *> ordered_tree_items;
|
Vector<TreeItem *> ordered_tree_items;
|
||||||
// entires that match the search mask.
|
// entires that match the search mask.
|
||||||
|
// TODO: Decide if this can be removed. It can be implicitly infered from number_matches.
|
||||||
Vector<TreeItem *> matching_entries;
|
Vector<TreeItem *> matching_entries;
|
||||||
// number of descendant matches for each tree item.
|
// number of descendant matches for each tree item.
|
||||||
HashMap<TreeItem *, int> number_matches;
|
HashMap<TreeItem *, int> number_matches;
|
||||||
|
@ -122,7 +123,7 @@ private:
|
||||||
CheckBox *check_button_filter_highlight;
|
CheckBox *check_button_filter_highlight;
|
||||||
void _initialize_controls();
|
void _initialize_controls();
|
||||||
void _add_spacer(float width_multiplier = 1.f);
|
void _add_spacer(float width_multiplier = 1.f);
|
||||||
|
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue