diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2024-05-09 14:46:58 +0300 |
---|---|---|
committer | Yuri Rubinsky <chaosus89@gmail.com> | 2024-05-09 15:16:33 +0300 |
commit | 1fd1adc285163b4e62dafd98fcdbeb73f87463e5 (patch) | |
tree | 888e762bb7e1418a909c7c32e62dcbf0dcefd5bf | |
parent | c4279fe3e0b27d0f40857c00eece7324a967285f (diff) | |
download | redot-engine-1fd1adc285163b4e62dafd98fcdbeb73f87463e5.tar.gz |
Fix placement of ColorPicker in the editor
-rw-r--r-- | scene/gui/box_container.cpp | 4 | ||||
-rw-r--r-- | scene/gui/margin_container.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 88f65ca1bc..d8fcbbb883 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -243,8 +243,8 @@ Size2 BoxContainer::get_minimum_size() const { bool first = true; for (int i = 0; i < get_child_count(); i++) { - Control *c = as_sortable_control(get_child(i)); - if (!c) { + Control *c = Object::cast_to<Control>(get_child(i)); + if (!c || !c->is_visible() || c->is_set_as_top_level()) { continue; } diff --git a/scene/gui/margin_container.cpp b/scene/gui/margin_container.cpp index 91e6c1f092..06e4a7cc13 100644 --- a/scene/gui/margin_container.cpp +++ b/scene/gui/margin_container.cpp @@ -36,8 +36,8 @@ Size2 MarginContainer::get_minimum_size() const { Size2 max; for (int i = 0; i < get_child_count(); i++) { - Control *c = as_sortable_control(get_child(i)); - if (!c) { + Control *c = Object::cast_to<Control>(get_child(i)); + if (!c || !c->is_visible() || c->is_set_as_top_level()) { continue; } |