equal
deleted
inserted
replaced
71 |
71 |
72 if ((uint)sel >= this->vscroll.cap) return INVALID_ORDER; |
72 if ((uint)sel >= this->vscroll.cap) return INVALID_ORDER; |
73 |
73 |
74 sel += this->vscroll.pos; |
74 sel += this->vscroll.pos; |
75 |
75 |
76 return (sel <= v->num_orders * 2 && sel >= 0) ? sel : INVALID_ORDER; |
76 return (sel < v->num_orders * 2 && sel >= 0) ? sel : INVALID_ORDER; |
77 } |
77 } |
78 |
78 |
79 void OnPaint() |
79 void OnPaint() |
80 { |
80 { |
81 const Vehicle *v = GetVehicle(this->window_number); |
81 const Vehicle *v = GetVehicle(this->window_number); |