(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 6734f083b0
commit a50578c3ad
19 changed files with 58 additions and 134 deletions

View File

@@ -531,9 +531,8 @@ public:
break;
case SLWW_DRIVES_DIRECTORIES_LIST: { // Click the listbox
int y = (pt.y - this->GetWidget<NWidgetBase>(SLWW_DRIVES_DIRECTORIES_LIST)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height;
if (y < 0 || (y += this->vscroll.GetPosition()) >= this->vscroll.GetCount()) return;
int y = this->vscroll.GetScrolledRowFromWidget(pt.y, this, SLWW_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP);
if (y == INT_MAX) return;
const FiosItem *file = _fios_items.Get(y);