# HG changeset patch # User rubidium # Date 2011-01-18 21:09:13 # Node ID 91a5bff32f6ccdb63a322c7980318b3a9eaf7cf2 # Parent cd01b8169936c03a2cc639c5d1bad35f3ac6b8d9 (svn r21838) -Change: allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp --- 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; }