You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add as_sortable_control() to unify Container checks
This commit is contained in:
@@ -126,11 +126,8 @@ Control *SplitContainer::get_containable_child(int p_idx) const {
|
||||
int idx = 0;
|
||||
|
||||
for (int i = 0; i < get_child_count(false); i++) {
|
||||
Control *c = Object::cast_to<Control>(get_child(i, false));
|
||||
if (!c || !c->is_visible()) {
|
||||
continue;
|
||||
}
|
||||
if (c->is_set_as_top_level()) {
|
||||
Control *c = as_sortable_control(get_child(i, false));
|
||||
if (!c) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user