From 0971ed1f2cae6669024833c7a2eca1894175f631 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 10 Mar 2013 10:17:27 +0000 Subject: [PATCH] Make tooltips independent of cursor auto-hide. --- src/Input/FGMouseInput.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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();