From: James Turner Date: Mon, 11 Mar 2013 17:13:03 +0000 (+0000) Subject: Tweak hover logic. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=478692383856edb321c80db82b4a9805d3de41ae;p=flightgear.git Tweak hover logic. Fixes tooltips vanishing on mouse-move. --- diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index fa3e17903..f7d32778b 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -195,7 +195,8 @@ public: FGMouseCursor::Cursor cur = FGMouseCursor::CURSOR_ARROW; bool explicitCursor = false; - + bool didPick = false; + if (globals->get_renderer()->pick(pickList, windowPos)) { std::vector::const_iterator i; @@ -214,18 +215,21 @@ public: } if (done) { + didPick = true; break; } } // of picks iteration - } // of have valid pick + } else { // of have valid pick + } - if (!explicitCursor && (priority == SGPickCallback::PriorityPanel)) { cur = FGMouseCursor::CURSOR_HAND; } FGMouseCursor::instance()->setCursor(cur); - updateHover(); + if (!didPick) { + updateHover(); + } } void doMouseMoveWithCallbacks(const osgGA::GUIEventAdapter* ea)