1
0
Fork 0

Tweak hover logic.

Fixes tooltips vanishing on mouse-move.
This commit is contained in:
James Turner 2013-03-11 17:13:03 +00:00
parent 07f01bd734
commit 4786923838

View file

@ -195,6 +195,7 @@ public:
FGMouseCursor::Cursor cur = FGMouseCursor::CURSOR_ARROW; FGMouseCursor::Cursor cur = FGMouseCursor::CURSOR_ARROW;
bool explicitCursor = false; bool explicitCursor = false;
bool didPick = false;
if (globals->get_renderer()->pick(pickList, windowPos)) { if (globals->get_renderer()->pick(pickList, windowPos)) {
@ -214,19 +215,22 @@ public:
} }
if (done) { if (done) {
didPick = true;
break; break;
} }
} // of picks iteration } // of picks iteration
} // of have valid pick } else { // of have valid pick
}
if (!explicitCursor && (priority == SGPickCallback::PriorityPanel)) { if (!explicitCursor && (priority == SGPickCallback::PriorityPanel)) {
cur = FGMouseCursor::CURSOR_HAND; cur = FGMouseCursor::CURSOR_HAND;
} }
FGMouseCursor::instance()->setCursor(cur); FGMouseCursor::instance()->setCursor(cur);
if (!didPick) {
updateHover(); updateHover();
} }
}
void doMouseMoveWithCallbacks(const osgGA::GUIEventAdapter* ea) void doMouseMoveWithCallbacks(const osgGA::GUIEventAdapter* ea)
{ {