diff options
-rw-r--r-- | src/smallmap_gui.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index f2ef2ee04..c113b4811 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1176,12 +1176,8 @@ public: virtual void OnScroll(Point delta) { - ViewPort *vp = IsPtInWindowViewport(this, _cursor.pos.x, _cursor.pos.y); - - if (vp == NULL) { - _cursor.fix_at = false; - _scrolling_viewport = false; - } + 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); |