mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Tree: Fix offset calculation when there are hidden items
(cherry picked from commit a083c85521)
This commit is contained in:
parent
c1ec270b44
commit
df80e2ae43
1 changed files with 2 additions and 2 deletions
|
|
@ -4523,8 +4523,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue