summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-18 21:09:13 +0000
committerrubidium <rubidium@openttd.org>2011-01-18 21:09:13 +0000
commit561449992a943fe796ac1d0cb4f4126c108a266c (patch)
treec7541bcbba4d8c3dd99647a96802cb969699ac8d /src
parent22d17aa7455aee6b4d950702ca1f44a5bf7878ff (diff)
downloadopenttd-561449992a943fe796ac1d0cb4f4126c108a266c.tar.xz
(svn r21838) -Change: allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge
Diffstat (limited to 'src')
-rw-r--r--src/viewport_gui.cpp7
1 files changed, 2 insertions, 5 deletions
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;
}