From 57339486d9491e902c963fbe6f97423f4a978676 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 11 Apr 2019 20:37:47 +0100 Subject: [PATCH] Flip the default meaning of alternate-mouse-wheel-dir --- simgear/scene/model/SGPickAnimation.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/simgear/scene/model/SGPickAnimation.cxx b/simgear/scene/model/SGPickAnimation.cxx index 6551500f..9b9f5249 100644 --- a/simgear/scene/model/SGPickAnimation.cxx +++ b/simgear/scene/model/SGPickAnimation.cxx @@ -582,20 +582,18 @@ public: } } } - - virtual bool buttonPressed( int button, - const osgGA::GUIEventAdapter& ea, - const Info& ) - { + + bool buttonPressed( int button, const osgGA::GUIEventAdapter& ea, const Info& ) override + { if (!_condition || _condition->test()) { // the 'be nice to Mac / laptop' users option; alt-clicking spins the - // opposite direction. Should make this configurable + // opposite direction. Should make this configurable if ((button == 0) && (ea.getModKeyMask() & osgGA::GUIEventAdapter::MODKEY_ALT)) { button = 1; } - int increaseMouseWheel = static_knobMouseWheelAlternateDirection ? 3 : 4; - int decreaseMouseWheel = static_knobMouseWheelAlternateDirection ? 4 : 3; + const int increaseMouseWheel = static_knobMouseWheelAlternateDirection ? 4 : 3; + const int decreaseMouseWheel = static_knobMouseWheelAlternateDirection ? 3 : 4; _direction = DIRECTION_NONE; if ((button == 0) || (button == increaseMouseWheel)) {