Fix GridContainer not ignoring toplevel children

(cherry picked from commit 506d8ba526188bb683eeb4e4389c8bd4a18abab8)
This commit is contained in:
Michael Alexsander 2022-04-13 18:09:51 -03:00 committed by Relintai
parent be66ed9679
commit 21d66d3a68

View File

@ -50,6 +50,9 @@ void GridContainer::_notification(int p_what) {
if (!c || !c->is_visible_in_tree()) { if (!c || !c->is_visible_in_tree()) {
continue; continue;
} }
if (c->is_set_as_toplevel()) {
continue;
}
int row = valid_controls_index / columns; int row = valid_controls_index / columns;
int col = valid_controls_index % columns; int col = valid_controls_index % columns;