2
0
Эх сурвалжийг харах

Merge pull request #75977 from timothyqiu/invisible-item

Tree: Fix offset calculation when there are hidden items
Rémi Verschelde 2 жил өмнө
parent
commit
cd03028915
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      scene/gui/tree.cpp

+ 2 - 2
scene/gui/tree.cpp

@@ -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;
 		}