From 561449992a943fe796ac1d0cb4f4126c108a266c Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 18 Jan 2011 21:09:13 +0000 Subject: (svn r21838) -Change: allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge --- src/viewport_gui.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index ef831af39..bef7f9af2 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -137,11 +137,8 @@ public: virtual void OnScroll(Point delta) { - const ViewPort *vp = IsPtInWindowViewport(this, _cursor.pos.x, _cursor.pos.y); - if (vp == NULL) return; - - this->viewport->scrollpos_x += ScaleByZoom(delta.x, vp->zoom); - this->viewport->scrollpos_y += ScaleByZoom(delta.y, vp->zoom); + this->viewport->scrollpos_x += ScaleByZoom(delta.x, this->viewport->zoom); + this->viewport->scrollpos_y += ScaleByZoom(delta.y, this->viewport->zoom); this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x; this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y; } -- cgit v1.2.3-70-g09d2