From 02a297669a5353518d51f6f4d9641114e557aede Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 4 Jan 2010 17:54:57 +0000 Subject: (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 --- src/station_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/station_gui.cpp') 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(JSW_PANEL)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height; + uint32 st_index = (pt.y - this->GetWidget(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--; -- cgit v1.2.3-54-g00ecf