diff options
-rw-r--r-- | scene/gui/grid_container.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index d0e2edc7b5..50217682ce 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -46,7 +46,7 @@ void GridContainer::_notification(int p_what) { int hsep = get_constant("hseparation"); int vsep = get_constant("vseparation"); int max_col = MIN(get_child_count(), columns); - int max_row = get_child_count() / columns; + int max_row = ceil((float)get_child_count() / (float)columns); // Compute the per-column/per-row data valid_controls_index = 0; |