diff options
author | rubidium <rubidium@openttd.org> | 2009-11-16 20:34:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-11-16 20:34:57 +0000 |
commit | 626de6b128f3580c9559b2d09b15bb4ed314a20a (patch) | |
tree | 93239d913d9ad578483f4e7cbd42e76427bcf7a5 /src/ai/ai_gui.cpp | |
parent | cb3c4f2ebe01b91562ecf21b56742e31b4086d91 (diff) | |
download | openttd-626de6b128f3580c9559b2d09b15bb4ed314a20a.tar.xz |
(svn r18126) -Codechange: remove duplicate (since r18119) scrollbar capacity/matrix initialisation
Diffstat (limited to 'src/ai/ai_gui.cpp')
-rw-r--r-- | src/ai/ai_gui.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index aa51f568c..d316a011a 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -60,9 +60,7 @@ struct AIListWindow : public Window { this->InitNested(desc); // Initializes 'this->line_height' as side effect. - this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(AIL_WIDGET_LIST)->current_y / this->line_height); this->vscroll.SetCount((int)this->ai_info_list->size() + 1); - this->GetWidget<NWidgetCore>(AIL_WIDGET_LIST)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); /* Try if we can find the currently selected AI */ this->selected = -1; @@ -277,9 +275,7 @@ struct AISettingsWindow : public Window { this->InitNested(desc); // Initializes 'this->line_height' as side effect. - this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(AIS_WIDGET_BACKGROUND)->current_y / this->line_height); this->vscroll.SetCount((int)this->ai_config->GetConfigList()->size()); - this->GetWidget<NWidgetCore>(AIS_WIDGET_BACKGROUND)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *resize) @@ -677,8 +673,6 @@ struct AIDebugWindow : public Window { } this->DisableWidget(AID_WIDGET_RELOAD_TOGGLE); - this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(AID_WIDGET_LOG_PANEL)->current_y / this->resize.step_height); - this->last_vscroll_pos = 0; this->autoscroll = true; |