diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-03-19 10:12:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 10:12:20 +0100 |
commit | cc8f7c78af9eace1a92380ef06f896dd19864325 (patch) | |
tree | 596a1ed05617e98d15e6c1a5119801123ba451f2 /scene/gui | |
parent | 4f97d5a7e2388fff1aba40f159d92d030e6d2066 (diff) | |
parent | 896e5a64d39e4dd477d961c5c78b480910fb6b09 (diff) |
Merge pull request #17618 from groud/fix_gridcontainer
Fixes wrong calculation of gridcontainer's children size
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/grid_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index 9948672097..b401abd436 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -84,8 +84,8 @@ void GridContainer::_notification(int p_what) { if (!row_expanded.has(E->key())) remaining_space.height -= E->get(); } - remaining_space.height -= vsep * (max_row - 1); - remaining_space.width -= hsep * (max_col - 1); + remaining_space.height -= vsep * MAX(max_row - 1, 0); + remaining_space.width -= hsep * MAX(max_col - 1, 0); bool can_fit = false; while (!can_fit && col_expanded.size() > 0) { |