(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

pull/155/head
rubidium 15 years ago
parent 550b68c96e
commit ee473d6700

@ -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…
Cancel
Save