From 506d8ba526188bb683eeb4e4389c8bd4a18abab8 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 13 Apr 2022 18:09:51 -0300 Subject: [PATCH] Fix `GridContainer` not ignoring toplevel children --- scene/gui/grid_container.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index 3c1f4bb93b7..35bceea6063 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -50,6 +50,9 @@ void GridContainer::_notification(int p_what) { if (!c || !c->is_visible_in_tree()) { continue; } + if (c->is_set_as_top_level()) { + continue; + } int row = valid_controls_index / columns; int col = valid_controls_index % columns;