浏览代码

Merge pull request #61566 from monkeyman192/correct_relationship_line_lens

Rémi Verschelde 3 年之前
父节点
当前提交
204f260fef
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/tree.cpp

+ 1 - 1
scene/gui/tree.cpp

@@ -2169,7 +2169,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
 				int parent_ofs = p_pos.x + cache.item_margin;
 				int parent_ofs = p_pos.x + cache.item_margin;
 				Point2i root_pos = Point2i(root_ofs, children_pos.y + label_h / 2) - cache.offset + p_draw_ofs;
 				Point2i root_pos = Point2i(root_ofs, children_pos.y + label_h / 2) - cache.offset + p_draw_ofs;
 
 
-				if (c->get_first_child() != nullptr) {
+				if (c->get_visible_child_count() > 0) {
 					root_pos -= Point2i(cache.arrow->get_width(), 0);
 					root_pos -= Point2i(cache.arrow->get_width(), 0);
 				}
 				}