summaryrefslogtreecommitdiffstats
path: root/scene/gui/graph_element.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-06-02 00:33:28 +0200
committerkobewi <kobewi4e@gmail.com>2024-06-03 20:01:31 +0200
commit02e1e6d1ecb2f152589215145dd16e622d6aa8da (patch)
tree2c6f512d2c4a8b16454ea0bcc837ad0a81371e70 /scene/gui/graph_element.cpp
parent5f1184e93fe1021c86520460dc0a6619bff3c1fb (diff)
downloadredot-engine-02e1e6d1ecb2f152589215145dd16e622d6aa8da.tar.gz
Add visibilty mode to as_sortable_control()
Diffstat (limited to 'scene/gui/graph_element.cpp')
-rw-r--r--scene/gui/graph_element.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/graph_element.cpp b/scene/gui/graph_element.cpp
index e231b05d7f..b63ed8d1ad 100644
--- a/scene/gui/graph_element.cpp
+++ b/scene/gui/graph_element.cpp
@@ -60,8 +60,8 @@ void GraphElement::_resort() {
Size2 GraphElement::get_minimum_size() const {
Size2 minsize;
for (int i = 0; i < get_child_count(); i++) {
- Control *child = Object::cast_to<Control>(get_child(i));
- if (!child || child->is_set_as_top_level()) {
+ Control *child = as_sortable_control(get_child(i), SortableVisbilityMode::IGNORE);
+ if (!child) {
continue;
}