mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-18 07:17:18 +01:00
Ported: Fix GridContainer max row/column calculations not skipping hidden children
- kleonc
0ce6ef7215
This commit is contained in:
parent
feb55d26d2
commit
52ea64d04b
@ -40,8 +40,6 @@ void GridContainer::_notification(int p_what) {
|
|||||||
|
|
||||||
int hsep = get_theme_constant("hseparation");
|
int hsep = get_theme_constant("hseparation");
|
||||||
int vsep = get_theme_constant("vseparation");
|
int vsep = get_theme_constant("vseparation");
|
||||||
int max_col = MIN(get_child_count(), columns);
|
|
||||||
int max_row = ceil((float)get_child_count() / (float)columns);
|
|
||||||
|
|
||||||
// Compute the per-column/per-row data.
|
// Compute the per-column/per-row data.
|
||||||
int valid_controls_index = 0;
|
int valid_controls_index = 0;
|
||||||
@ -78,6 +76,9 @@ void GridContainer::_notification(int p_what) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int max_col = MIN(valid_controls_index, columns);
|
||||||
|
int max_row = ceil((float)valid_controls_index / (float)columns);
|
||||||
|
|
||||||
// Consider all empty columns expanded.
|
// Consider all empty columns expanded.
|
||||||
for (int i = valid_controls_index; i < columns; i++) {
|
for (int i = valid_controls_index; i < columns; i++) {
|
||||||
col_expanded.insert(i);
|
col_expanded.insert(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user