Tweak hover logic.
Fixes tooltips vanishing on mouse-move.
This commit is contained in:
parent
07f01bd734
commit
4786923838
1 changed files with 8 additions and 4 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue