diff options
author | rubidium <rubidium@openttd.org> | 2009-10-17 14:29:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-10-17 14:29:10 +0000 |
commit | d1d35b95b6e75a263b9395125af7d22faf02f462 (patch) | |
tree | daed0a809413d71060da91af4c67175989222a2e /src/depot_gui.cpp | |
parent | 22ddb90fdbc45087064816ddb0cf0e0a27786db1 (diff) | |
download | openttd-d1d35b95b6e75a263b9395125af7d22faf02f462.tar.xz |
(svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 4 |
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); } |