diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-14 00:33:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 00:33:52 +0200 |
commit | 3b57c2ce6b81c39ae552b69633e4122117e07a19 (patch) | |
tree | c45337f5312cf2d1e1edec86fbef031e5fdd774a /scene/gui/grid_container.cpp | |
parent | 321213d863e7825d7e5a83902d108f4d6cb0b8fb (diff) | |
parent | 506d8ba526188bb683eeb4e4389c8bd4a18abab8 (diff) |
Merge pull request #60221 from YeldhamDev/grid_toplevel_fix
Fix `GridContainer` not ignoring toplevel children
Diffstat (limited to 'scene/gui/grid_container.cpp')
-rw-r--r-- | scene/gui/grid_container.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index 3c1f4bb93b..35bceea606 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; |