summaryrefslogtreecommitdiff
path: root/src/depot_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r--src/depot_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index d61a3fa87..671a97f6f 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -906,8 +906,8 @@ struct DepotWindow : Window {
virtual void OnResize(Point delta)
{
- this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height);
- this->hscroll.UpdateCapacity(delta.x / (int)this->resize.step_width);
+ this->vscroll.SetCapacity(this->GetWidget<NWidgetCore>(DEPOT_WIDGET_MATRIX)->current_y / (int)this->resize.step_height);
+ this->hscroll.SetCapacity(this->GetWidget<NWidgetCore>(DEPOT_WIDGET_MATRIX)->current_x / (int)this->resize.step_width);
this->GetWidget<NWidgetCore>(DEPOT_WIDGET_MATRIX)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) +
((this->type == VEH_TRAIN ? 1 : this->hscroll.GetCapacity()) << MAT_COL_START);
}