Skip to content

Commit

Permalink
Merge pull request #82660 from coumcashier/itemlist_height_fix
Browse files Browse the repository at this point in the history
Fix storing invalid item height values in `ItemList`
  • Loading branch information
akien-mga committed Nov 10, 2023
2 parents 28ada45 + 1533292 commit 7f8edaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scene/gui/item_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1431,11 +1431,11 @@ void ItemList::force_update_list_size() {
}
}

for (int j = items.size() - 1; j >= 0 && col > 0; j--, col--) {
items.write[j].rect_cache.size.y = max_h;
}

if (all_fit) {
for (int j = items.size() - 1; j >= 0 && col > 0; j--, col--) {
items.write[j].rect_cache.size.y = max_h;
}

float page = MAX(0, size.height - theme_cache.panel_style->get_minimum_size().height);
float max = MAX(page, ofs.y + max_h);
if (auto_height) {
Expand Down

0 comments on commit 7f8edaa

Please sign in to comment.