瀏覽代碼

Merge pull request #104370 from BrotherShort/no-arrow-no-root-offset

Tree: Fix offset relationship lines with Hide Folding
Thaddeus Crews 4 月之前
父節點
當前提交
e471465d39
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/tree.cpp

+ 1 - 1
scene/gui/tree.cpp

@@ -2642,7 +2642,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
 
 				int root_ofs = children_pos.x + ((p_item->disable_folding || hide_folding) ? theme_cache.h_separation : theme_cache.item_margin);
 				Point2i root_pos = Point2i(root_ofs, children_pos.y + child_self_height / 2) - theme_cache.offset + p_draw_ofs;
-				if (c->get_visible_child_count() > 0) {
+				if (!hide_folding && !p_item->disable_folding && c->get_visible_child_count() > 0) {
 					root_pos -= Point2i(theme_cache.arrow->get_width(), 0);
 				}
 				root_pos.x = MIN(root_pos.x, get_column_width(0) + p_draw_ofs.x);