summaryrefslogtreecommitdiff
path: root/src/bridge_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-16 20:34:57 +0000
committerrubidium <rubidium@openttd.org>2009-11-16 20:34:57 +0000
commit626de6b128f3580c9559b2d09b15bb4ed314a20a (patch)
tree93239d913d9ad578483f4e7cbd42e76427bcf7a5 /src/bridge_gui.cpp
parentcb3c4f2ebe01b91562ecf21b56742e31b4086d91 (diff)
downloadopenttd-626de6b128f3580c9559b2d09b15bb4ed314a20a.tar.xz
(svn r18126) -Codechange: remove duplicate (since r18119) scrollbar capacity/matrix initialisation
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 0f30cb423..73359d8e9 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -143,13 +143,11 @@ public:
this->SortBridgeList();
this->vscroll.SetCount(bl->Length());
- this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(BBSW_BRIDGE_LIST)->current_y / this->resize.step_height);
if (this->last_size < this->vscroll.GetCapacity()) this->last_size = this->vscroll.GetCapacity();
if (this->last_size > this->vscroll.GetCount()) this->last_size = this->vscroll.GetCount();
/* Resize the bridge selection window if we used a bigger one the last time. */
if (this->last_size > this->vscroll.GetCapacity()) {
ResizeWindow(this, 0, (this->last_size - this->vscroll.GetCapacity()) * this->resize.step_height);
- this->vscroll.SetCapacity(this->last_size);
}
this->GetWidget<NWidgetCore>(BBSW_BRIDGE_LIST)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}