diff options
author | Alexander Weiss <ik@alexanderweiss.nl> | 2018-04-28 00:12:49 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-05-24 21:31:37 +0200 |
commit | e1a164b5316a6242d69d56b53c9df19edb9d279f (patch) | |
tree | d818e4d7ff211cd34cb458099be113b31ba2ea9a /src/window.cpp | |
parent | 6df7ced343deb150323f709822b5fde1e8fe1d97 (diff) | |
download | openttd-e1a164b5316a6242d69d56b53c9df19edb9d279f.tar.xz |
Change: [OSX] Setting mouse-wheel to scroll the map does not disable pinch to zoom
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp index 30c1b8705..f17fccf93 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2858,8 +2858,8 @@ static void MouseLoop(MouseClick click, int mousewheel) if (vp != NULL && (_game_mode == GM_MENU || HasModalProgress())) return; if (mousewheel != 0) { - /* Send mousewheel event to window */ - w->OnMouseWheel(mousewheel); + /* Send mousewheel event to window, unless we're scrolling a viewport or the map */ + if (!scrollwheel_scrolling || (vp == NULL && w->window_class != WC_SMALLMAP)) w->OnMouseWheel(mousewheel); /* Dispatch a MouseWheelEvent for widgets if it is not a viewport */ if (vp == NULL) DispatchMouseWheelEvent(w, w->nested_root->GetWidgetFromPos(x - w->left, y - w->top), mousewheel); |