Merge pull request #75977 from timothyqiu/invisible-item

Tree: Fix offset calculation when there are hidden items
This commit is contained in:
Rémi Verschelde 2023-04-12 13:28:16 +02:00
commit cd03028915
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -4594,8 +4594,8 @@ int Tree::get_item_offset(TreeItem *p_item) const {
return ofs;
}
ofs += compute_item_height(it);
if (it != root || !hide_root) {
if ((it != root || !hide_root) && it->is_visible()) {
ofs += compute_item_height(it);
ofs += theme_cache.v_separation;
}