Skip to content

Commit f8520f9

Browse files
committed
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.
1 parent 3a372af commit f8520f9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

indra/newview/lltoolmgr.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ void LLToolMgr::toggleBuildMode()
330330
// avoid spurious avatar movements
331331
LLViewerJoystick::getInstance()->setNeedsReset();
332332

333+
if (gFocusMgr.getKeyboardFocus()) gFloaterTools->setFocus(true); // Focus isn't on the world, give it to the build tools.
334+
}
335+
.. else if (gFloaterTools->getVisible() && !gFloaterTools->hasFocus() && gFocusMgr.getKeyboardFocus()) // Build tools is open, but not the focused floater, give it focus.
336+
{
337+
gFloaterTools->setFocus(true);
333338
}
334339
else
335340
{

0 commit comments

Comments
 (0)