Fixes wrong calculation of gridcontainer's children size

(cherry picked from commit 896e5a64d3)
This commit is contained in:
Gilles Roudiere 2018-03-18 22:33:17 +01:00 committed by Hein-Pieter van Braam
parent c07d588e80
commit 448d281222
1 changed files with 2 additions and 2 deletions

View File

@ -84,8 +84,8 @@ void GridContainer::_notification(int p_what) {
if (!row_expanded.has(E->key())) if (!row_expanded.has(E->key()))
remaining_space.height -= E->get(); remaining_space.height -= E->get();
} }
remaining_space.height -= vsep * (max_row - 1); remaining_space.height -= vsep * MAX(max_row - 1, 0);
remaining_space.width -= hsep * (max_col - 1); remaining_space.width -= hsep * MAX(max_col - 1, 0);
bool can_fit = false; bool can_fit = false;
while (!can_fit && col_expanded.size() > 0) { while (!can_fit && col_expanded.size() > 0) {