Skip to content

Commit

Permalink
Check visibility of items before drawing their relationship lines
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyman192 committed May 26, 2022
1 parent 2e88628 commit d4aa6e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
}

// Draw relationship lines.
if (cache.draw_relationship_lines > 0 && (!hide_root || c->parent != root)) {
if (cache.draw_relationship_lines > 0 && (!hide_root || c->parent != root) && c->is_visible()) {
int root_ofs = children_pos.x + ((p_item->disable_folding || hide_folding) ? cache.hseparation : 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;
Expand Down

0 comments on commit d4aa6e5

Please sign in to comment.