Allow invisible rows in a listbox.

This commit is contained in:
Mark de Wever 2009-07-13 20:13:00 +00:00
parent 79f34fa53a
commit 47c10cf158

View file

@ -94,6 +94,10 @@ tpoint tvertical_list::calculate_best_size() const
const tgrid& grid = get_item(i);
if(grid.get_visible() == twidget::INVISIBLE) {
continue;
}
const tpoint best_size = grid.get_best_size();
if(best_size.x > result.x) {
@ -121,6 +125,10 @@ void tvertical_list::set_size(const tpoint& origin, const tpoint& size)
tgrid& grid = get_item(i);
if(grid.get_visible() == twidget::INVISIBLE) {
continue;
}
tpoint best_size = grid.get_best_size();
assert(best_size.x <= size.x);
// FIXME should we look at grow factors???