Mercurial > hg > openttd
changeset 13314:7dbe198e1eb4 draft
(svn r17823) -Codechange: Use top of the matrix widget as offset for row calculation in autoreplace window.
author | alberth <alberth@openttd.org> |
---|---|
date | Tue, 20 Oct 2009 18:39:45 +0000 |
parents | c41b3f705c2e |
children | c501e43a45fe |
files | src/autoreplace_gui.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -419,7 +419,7 @@ case RVW_WIDGET_LEFT_MATRIX: case RVW_WIDGET_RIGHT_MATRIX: { - uint i = (pt.y - 14) / this->resize.step_height; + uint i = (pt.y - this->GetWidget<NWidgetBase>(RVW_WIDGET_LEFT_MATRIX)->pos_y) / this->resize.step_height; uint16 click_scroll_pos = widget == RVW_WIDGET_LEFT_MATRIX ? this->vscroll.GetPosition() : this->vscroll2.GetPosition(); uint16 click_scroll_cap = widget == RVW_WIDGET_LEFT_MATRIX ? this->vscroll.GetCapacity() : this->vscroll2.GetCapacity(); byte click_side = widget == RVW_WIDGET_LEFT_MATRIX ? 0 : 1;