summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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--;