diff options
author | rubidium <rubidium@openttd.org> | 2010-01-04 17:54:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-04 17:54:57 +0000 |
commit | 02a297669a5353518d51f6f4d9641114e557aede (patch) | |
tree | 3a7d5985623f45cb21c12857a8861058e613cfbf | |
parent | 51f5102713152a10399652e0b3f18bbb0caa3aa7 (diff) | |
download | openttd-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
-rw-r--r-- | src/station_gui.cpp | 2 |
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--; |