summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-27 10:19:17 +0200
committerGitHub <noreply@github.com>2022-05-27 10:19:17 +0200
commitb60c78ab72158b951f17799f5f77473229c0ef5a (patch)
tree1e41f7e256cf4a21c3ed25b5af40a887838d1ff4
parent9d28e1027636ebf1750a65105f6a23a17210813d (diff)
parentd4aa6e5366f228eb2bbadc7b3946b4b28db60ff9 (diff)
Merge pull request #61437 from monkeyman192/hide_invisble_lines
Check visibility of items before drawing their relationship lines
-rw-r--r--scene/gui/tree.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 8f292533e6..b4602e7a5a 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -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;