diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index f0474fab4..f7f5c4552 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -575,6 +575,12 @@ void FGMouseInput::doMouseClick (int b, int updown, int x, int y, bool mainWindo callbacks.pop_front(); } + + if (ea->getHandled()) { + // for https://sourceforge.net/p/flightgear/codetickets/2347/ + // we cleared the active picks, but don't do further processing + return; + } } if (mode.pass_through) { diff --git a/src/Viewer/FGEventHandler.cxx b/src/Viewer/FGEventHandler.cxx index b62acc27e..620e2bf88 100644 --- a/src/Viewer/FGEventHandler.cxx +++ b/src/Viewer/FGEventHandler.cxx @@ -123,15 +123,19 @@ bool FGEventHandler::handle(const osgGA::GUIEventAdapter& ea, // Event handlers seem to be called even if the according event has already // been handled. Already handled events shouldn't be handled multiple times // so we need to exit here manually. - if( ea.getHandled() - // Let mouse move events pass to correctly handle mouse cursor hide - // timeout while moving just on the canvas gui. - // TODO We should clean up the whole mouse input and make hide - // timeout independent of the event handler which consumed the - // event. - && ea.getEventType() != osgGA::GUIEventAdapter::MOVE - && ea.getEventType() != osgGA::GUIEventAdapter::DRAG ) - return false; + if (ea.getHandled() + // Let mouse move events pass to correctly handle mouse cursor hide + // timeout while moving just on the canvas gui. + // TODO We should clean up the whole mouse input and make hide + // timeout independent of the event handler which consumed the + // event. + + // if we see a release, still process for active pick callbacks + // https://sourceforge.net/p/flightgear/codetickets/2347/ + + && ea.getEventType() != osgGA::GUIEventAdapter::MOVE && ea.getEventType() != osgGA::GUIEventAdapter::DRAG && ea.getEventType() != osgGA::GUIEventAdapter::RELEASE) { + return false; + } int x = 0; int y = 0;