]> git.mxchange.org Git - flightgear.git/commitdiff
#403: 2D horizontal scrolling on Mac OS
authorThorstenB <brehmt@gmail.com>
Thu, 18 Aug 2011 19:32:24 +0000 (21:32 +0200)
committerThorstenB <brehmt@gmail.com>
Thu, 18 Aug 2011 19:32:24 +0000 (21:32 +0200)
Ignore events with X-axis scrolling only (getScrollingDeltaY() == 0).
Thanks to Tatsuhiro Nishioka.

src/Main/FGEventHandler.cxx

index 91d830e6dff1a561b9df7d1d4eb7a8b91e31b3d7..e43f4b8aba552cb83225c4e526c90c7572c9bd5f 100644 (file)
@@ -208,7 +208,7 @@ bool FGEventHandler::handle(const osgGA::GUIEventAdapter& ea,
         if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_2D) {
             if (ea.getScrollingDeltaY() > 0)
                 button = 3;
-            else
+            else if (ea.getScrollingDeltaY() < 0)
                 button = 4;
         } else if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP)
             button = 3;