Fix ui::grid_layout::set_size element parenting
This commit is contained in:
parent
cf13025cc6
commit
6fe5d72415
1 changed files with 9 additions and 0 deletions
|
|
@ -66,6 +66,15 @@ namespace psemek::ui
|
|||
std::size_t const old_row_count = row_count();
|
||||
std::size_t const old_column_count = column_count();
|
||||
|
||||
for (std::size_t i = 0; i < old_row_count; ++i)
|
||||
{
|
||||
for (std::size_t j = 0; j < old_column_count; ++j)
|
||||
{
|
||||
if (i >= rows || j >= columns)
|
||||
set(i, j, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
children_.resize({rows, columns});
|
||||
|
||||
children_range_.resize(rows * columns);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue