diff options
author | frosch <frosch@openttd.org> | 2013-06-30 14:33:32 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-30 14:33:32 +0000 |
commit | e184b9799cd855eadfae0863a5a7930168535c89 (patch) | |
tree | cf05abe7755550bd356830b345c0e2f45a829921 /src/ai | |
parent | 5f8f71edf069a7298fa2b435ca9ee63a625d778f (diff) | |
download | openttd-e184b9799cd855eadfae0863a5a7930168535c89.tar.xz |
(svn r25533) -Codechange: Use SetCapacityFromWidget more often.
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/ai_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index ff3a8a502..0736e9ba9 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -211,7 +211,7 @@ struct AIListWindow : public Window { virtual void OnResize() { NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_AIL_LIST); - this->vscroll->SetCapacity(nwi->current_y / this->line_height); + this->vscroll->SetCapacityFromWidget(this, WID_AIL_LIST); nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); } @@ -562,7 +562,7 @@ struct AISettingsWindow : public Window { virtual void OnResize() { NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_AIS_BACKGROUND); - this->vscroll->SetCapacity(nwi->current_y / this->line_height); + this->vscroll->SetCapacityFromWidget(this, WID_AIS_BACKGROUND); nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); } |