Fix filtering: Allow matching for root as ancestor

This commit is contained in:
Alexander Montag 2024-09-25 17:45:59 +00:00
parent b8259c6ee7
commit 8d29f16963
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ void TreeSearch::_filter_tree(const String &p_search_mask) {
while (first_counting_ancestor && !number_matches.has(first_counting_ancestor)) { while (first_counting_ancestor && !number_matches.has(first_counting_ancestor)) {
first_counting_ancestor = first_counting_ancestor->get_parent(); first_counting_ancestor = first_counting_ancestor->get_parent();
} }
if (!first_counting_ancestor || first_counting_ancestor == tree_reference->get_root() || !_vector_has_bsearch(matching_entries, first_counting_ancestor)) { if (!first_counting_ancestor || !_vector_has_bsearch(matching_entries, first_counting_ancestor)) {
cur_item->set_visible(false); cur_item->set_visible(false);
} }
} }