Another small cleanup.

Now that we only have screen coordinates the set_size hacks in the
generator and scroll_container are no longer needed and thus removed.
This commit is contained in:
Mark de Wever 2009-01-03 16:30:25 +00:00
parent f3bb08a911
commit f469350d31
2 changed files with 0 additions and 19 deletions

View File

@ -126,16 +126,7 @@ void tvertical_list::set_size(const tpoint& origin, const tpoint& size)
// FIXME should we look at grow factors???
best_size.x = size.x;
/*
* For set_size to work properly, we need to disable the parent
* temporary. Without a parent the screen coordinates won't be
* remapped, which is wanted in this case. For event handling the
* parent is needed.
*/
twidget* parent = grid.parent();
grid.set_parent(NULL);
grid.set_size(current_origin, best_size);
grid.set_parent(parent);
current_origin.y += best_size.y;
}

View File

@ -232,17 +232,7 @@ void tscrollbar_container::
std::max(best_size.x, content_size.x),
std::max(best_size.y, content_size.y));
/*
* For set_size to work properly, we need to disable the parent
* temporary. Without a parent the screen coordinates won't be
* remapped, which is wanted in this case. For event handling the
* parent is needed.
*/
twidget* parent = content_grid_->parent();
content_grid_->set_parent(NULL);
content_grid_->set_size(content_origin, content_grid_size);
content_grid_->set_parent(parent);
// Set vertical scrollbar
set_scrollbar_mode(vertical_scrollbar_grid_, vertical_scrollbar_,