From 7658bac2b5591c257bd58bf0d732938394b307bb Mon Sep 17 00:00:00 2001 From: alberth Date: Tue, 20 Oct 2009 18:39:45 +0000 Subject: (svn r17823) -Codechange: Use top of the matrix widget as offset for row calculation in autoreplace window. --- src/autoreplace_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index fd6a531c0..198e22f25 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -419,7 +419,7 @@ public: 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(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; -- cgit v1.2.3-54-g00ecf