summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-04 17:54:57 +0000
committerrubidium <rubidium@openttd.org>2010-01-04 17:54:57 +0000
commit02a297669a5353518d51f6f4d9641114e557aede (patch)
tree3a7d5985623f45cb21c12857a8861058e613cfbf /src
parent51f5102713152a10399652e0b3f18bbb0caa3aa7 (diff)
downloadopenttd-02a297669a5353518d51f6f4d9641114e557aede.tar.xz
(svn r18713) -Fix [FS#3476]: the join station window didn't account for scrolling, so if you did scroll the station was not joined with the selected station
Diffstat (limited to 'src')
-rw-r--r--src/station_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index fc56919da..9843e16f6 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -1336,7 +1336,7 @@ struct SelectStationWindow : Window {
{
if (widget != JSW_PANEL) return;
- uint32 st_index = (pt.y - this->GetWidget<NWidgetBase>(JSW_PANEL)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height;
+ uint32 st_index = (pt.y - this->GetWidget<NWidgetBase>(JSW_PANEL)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height + this->vscroll.GetPosition();
bool distant_join = (st_index > 0);
if (distant_join) st_index--;