mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 11:23:21 +00:00
(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
This commit is contained in:
parent
51f5102713
commit
02a297669a
@ -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--;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user