Skip to content

Commit e471465

Browse files
committed
Merge pull request #104370 from BrotherShort/no-arrow-no-root-offset
Tree: Fix offset relationship lines with Hide Folding
2 parents 6fed7a3 + f660cdb commit e471465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/gui/tree.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2642,7 +2642,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
26422642

26432643
int root_ofs = children_pos.x + ((p_item->disable_folding || hide_folding) ? theme_cache.h_separation : theme_cache.item_margin);
26442644
Point2i root_pos = Point2i(root_ofs, children_pos.y + child_self_height / 2) - theme_cache.offset + p_draw_ofs;
2645-
if (c->get_visible_child_count() > 0) {
2645+
if (!hide_folding && !p_item->disable_folding && c->get_visible_child_count() > 0) {
26462646
root_pos -= Point2i(theme_cache.arrow->get_width(), 0);
26472647
}
26482648
root_pos.x = MIN(root_pos.x, get_column_width(0) + p_draw_ofs.x);

0 commit comments

Comments
 (0)