From: James Turner Date: Sun, 10 Mar 2013 10:17:27 +0000 (+0000) Subject: Make tooltips independent of cursor auto-hide. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0971ed1f2cae6669024833c7a2eca1894175f631;p=flightgear.git Make tooltips independent of cursor auto-hide. --- diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index aee4f231a..97cc1b5da 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -387,17 +387,17 @@ void FGMouseInput::update ( double dt ) } } + // if delay is <= 0, disable tooltips + if ( !d->tooltipTimeoutDone && + (d->tooltipDelayMsec > 0) && + (m.timeSinceLastMove.elapsedMSec() > d->tooltipDelayMsec)) + { + d->tooltipTimeoutDone = true; + SGPropertyNode_ptr arg(new SGPropertyNode); + globals->get_commands()->execute("tooltip-timeout", arg); + } + if ( d->hideCursor ) { - // if delay is <= 0, disable tooltips - if ( !d->tooltipTimeoutDone && - (d->tooltipDelayMsec > 0) && - (m.timeSinceLastMove.elapsedMSec() > d->tooltipDelayMsec)) - { - d->tooltipTimeoutDone = true; - SGPropertyNode_ptr arg(new SGPropertyNode); - globals->get_commands()->execute("tooltip-timeout", arg); - } - if ( m.timeSinceLastMove.elapsedMSec() > d->cursorTimeoutMsec) { FGMouseCursor::instance()->hideCursorUntilMouseMove(); m.timeSinceLastMove.stamp();