diff --git a/src/osgGA/FirstPersonManipulator.cpp b/src/osgGA/FirstPersonManipulator.cpp index 86483f03d..ecd27950d 100644 --- a/src/osgGA/FirstPersonManipulator.cpp +++ b/src/osgGA/FirstPersonManipulator.cpp @@ -239,8 +239,8 @@ bool FirstPersonManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIAct if( _flags & SET_CENTER_ON_WHEEL_FORWARD_MOVEMENT ) { - if( sm == GUIEventAdapter::SCROLL_DOWN && _wheelMovement > 0. || - sm == GUIEventAdapter::SCROLL_UP && _wheelMovement < 0. ) + if( ((sm == GUIEventAdapter::SCROLL_DOWN) && (_wheelMovement > 0.)) || + ((sm == GUIEventAdapter::SCROLL_UP) && (_wheelMovement < 0.)) ) { // stop thrown animation @@ -261,7 +261,8 @@ bool FirstPersonManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIAct } } - switch( sm ) { + switch( sm ) + { // mouse scroll up event case GUIEventAdapter::SCROLL_UP: diff --git a/src/osgGA/OrbitManipulator.cpp b/src/osgGA/OrbitManipulator.cpp index 8af5ad610..d58e6ffa6 100644 --- a/src/osgGA/OrbitManipulator.cpp +++ b/src/osgGA/OrbitManipulator.cpp @@ -223,8 +223,8 @@ bool OrbitManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIActionAda if( _flags & SET_CENTER_ON_WHEEL_FORWARD_MOVEMENT ) { - if( sm == GUIEventAdapter::SCROLL_DOWN && _wheelZoomFactor > 0. || - sm == GUIEventAdapter::SCROLL_UP && _wheelZoomFactor < 0. ) + if( ((sm == GUIEventAdapter::SCROLL_DOWN && _wheelZoomFactor > 0.)) || + ((sm == GUIEventAdapter::SCROLL_UP && _wheelZoomFactor < 0.)) ) { if( getAnimationTime() <= 0. )