Merge pull request #34737 from timothyqiu/tree-item-offset

Fixes Tree item offset when root is hidden
This commit is contained in:
Rémi Verschelde 2020-01-02 08:17:29 +01:00 committed by GitHub
commit 1788b22b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3426,7 +3426,10 @@ int Tree::get_item_offset(TreeItem *p_item) const {
if (it == p_item)
return ofs;
ofs += compute_item_height(it) + cache.vseparation;
ofs += compute_item_height(it);
if (it != root || !hide_root) {
ofs += cache.vseparation;
}
if (it->children && !it->collapsed) {