summaryrefslogtreecommitdiff
path: root/src/timetable_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-12-20 20:08:39 +0000
committeralberth <alberth@openttd.org>2009-12-20 20:08:39 +0000
commit5a083f183e5ece4e379a12d7f5b927e54a83d04a (patch)
tree1d1fa960c0fffff8e0462b8086f4c46434b91773 /src/timetable_gui.cpp
parent20debea202d87ce595b2ebc353d22204e9820efc (diff)
downloadopenttd-5a083f183e5ece4e379a12d7f5b927e54a83d04a.tar.xz
(svn r18580) -Codechange: Use widget information only for setting scrollbar capacity.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r--src/timetable_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp
index 8bf59bb99..df9f28574 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -585,7 +585,7 @@ struct TimetableWindow : Window {
virtual void OnResize()
{
/* Update the scroll bar */
- this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(TTV_TIMETABLE_PANEL)->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height);
+ this->vscroll.SetCapacityFromWidget(this, TTV_TIMETABLE_PANEL, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
}
/**