summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-06-30 14:33:32 +0000
committerfrosch <frosch@openttd.org>2013-06-30 14:33:32 +0000
commite184b9799cd855eadfae0863a5a7930168535c89 (patch)
treecf05abe7755550bd356830b345c0e2f45a829921 /src/newgrf_gui.cpp
parent5f8f71edf069a7298fa2b435ca9ee63a625d778f (diff)
downloadopenttd-e184b9799cd855eadfae0863a5a7930168535c89.tar.xz
(svn r25533) -Codechange: Use SetCapacityFromWidget more often.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 37ed023b0..694510b1a 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -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);
}