Em Dash wants build tools to focus properly when the build button is clicked.

If the world is in focus and build button is pressed without the build floater open, don't bother focusing.
If a floater is in focus and build button is pressed without the build floater open, focus the build floater
If the build floater is in the background and the button is pressed, focus the build floater.
If the build floater is in focus and the button is pressed, close the build floater.
If the build floater is  not in focus but nothing else is, close the build floater.
This commit is contained in:
Inusaito Sayori
2014-09-03 19:41:07 -04:00
parent 3a372afc0e
commit f8520f9dd3

View File

@@ -330,6 +330,11 @@ void LLToolMgr::toggleBuildMode()
// avoid spurious avatar movements
LLViewerJoystick::getInstance()->setNeedsReset();
if (gFocusMgr.getKeyboardFocus()) gFloaterTools->setFocus(true); // Focus isn't on the world, give it to the build tools.
}
.. else if (gFloaterTools->getVisible() && !gFloaterTools->hasFocus() && gFocusMgr.getKeyboardFocus()) // Build tools is open, but not the focused floater, give it focus.
{
gFloaterTools->setFocus(true);
}
else
{