(svn r25533) -Codechange: Use SetCapacityFromWidget more often.

This commit is contained in:
frosch
2013-06-30 14:33:32 +00:00
parent ac73a5fea6
commit 7dac11fbb2
4 changed files with 5 additions and 5 deletions

View File

@@ -461,7 +461,7 @@ struct NewGRFParametersWindow : public Window {
virtual void OnResize()
{
NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_NP_BACKGROUND);
this->vscroll->SetCapacity(nwi->current_y / this->line_height);
this->vscroll->SetCapacityFromWidget(this, WID_NP_BACKGROUND);
nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}