(svn r20223) -Codechange: Replace scrolled row calculations by a call to GetScrolledRowFromWidget().

This commit is contained in:
alberth
2010-07-26 13:08:48 +00:00
parent 97f85f7bfb
commit 4203e641f8
19 changed files with 58 additions and 134 deletions

View File

@@ -1327,10 +1327,7 @@ public:
case BRSW_NEWST_LIST: {
const StationSpec *statspec;
int y = (pt.y - this->GetWidget<NWidgetBase>(BRSW_NEWST_LIST)->pos_y) / this->line_height;
if (y >= this->vscroll.GetCapacity()) return;
y += this->vscroll.GetPosition();
int y = this->vscroll.GetScrolledRowFromWidget(pt.y, this, BRSW_NEWST_LIST, 0, this->line_height);
if (y >= _railstation.station_count) return;
/* Check station availability callback */