From 02e1e6d1ecb2f152589215145dd16e622d6aa8da Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 2 Jun 2024 00:33:28 +0200 Subject: Add visibilty mode to as_sortable_control() --- scene/gui/graph_node.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scene/gui/graph_node.cpp') diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index d804f83e1c..72e59bfc8a 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -130,8 +130,8 @@ bool GraphNode::_get(const StringName &p_name, Variant &r_ret) const { void GraphNode::_get_property_list(List *p_list) const { int idx = 0; for (int i = 0; i < get_child_count(false); i++) { - Control *child = Object::cast_to(get_child(i, false)); - if (!child || child->is_set_as_top_level()) { + Control *child = as_sortable_control(get_child(i, false), SortableVisbilityMode::IGNORE); + if (!child) { continue; } @@ -658,8 +658,8 @@ void GraphNode::_port_pos_update() { int slot_index = 0; for (int i = 0; i < get_child_count(false); i++) { - Control *child = Object::cast_to(get_child(i, false)); - if (!child || child->is_set_as_top_level()) { + Control *child = as_sortable_control(get_child(i, false), SortableVisbilityMode::IGNORE); + if (!child) { continue; } -- cgit v1.2.3