(svn r18067) -Codechange: Eliminate a constant representing a widget top edge in vehicle windows.

This commit is contained in:
alberth
2009-11-14 08:44:12 +00:00
parent e016fa0fac
commit fb0158c8ce
2 changed files with 1 additions and 2 deletions

View File

@@ -1030,7 +1030,7 @@ public:
return;
case VLW_WIDGET_LIST: { // Matrix to show vehicles
uint32 id_v = (pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / this->resize.step_height;
uint32 id_v = (pt.y - this->GetWidget<NWidgetBase>(VLW_WIDGET_LIST)->pos_y) / this->resize.step_height;
const Vehicle *v;
if (id_v >= this->vscroll.GetCapacity()) return; // click out of bounds