summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_gui.cpp6
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;