diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-05 08:40:49 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-05 08:40:49 -0400 |
commit | 22a47eee84dbaa5c731c000c6013ca558bd15892 (patch) | |
tree | 8b3128fdb91731d95025b86701431826c441c5ba /indra/newview/lltoolmgr.cpp | |
parent | a6b85244a6f943a4598ff9b7b8a3343eb1e0d11e (diff) | |
parent | 7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (diff) |
Merge branch 'release/luau-scripting' into lua-resultset
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
-rw-r--r-- | indra/newview/lltoolmgr.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index e01f04f210..2ffb571201 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -102,12 +102,12 @@ LLToolMgr::LLToolMgr() void LLToolMgr::initTools() { - static BOOL initialized = FALSE; + static bool initialized = false; if(initialized) { return; } - initialized = TRUE; + initialized = true; gBasicToolset->addTool( LLToolPie::getInstance() ); gBasicToolset->addTool( LLToolCamera::getInstance() ); gCameraToolset->addTool( LLToolCamera::getInstance() ); @@ -143,14 +143,15 @@ LLToolMgr::~LLToolMgr() gToolNull = NULL; } -BOOL LLToolMgr::usingTransientTool() +bool LLToolMgr::usingTransientTool() { - return mTransientTool ? TRUE : FALSE; + return mTransientTool != nullptr; } void LLToolMgr::setCurrentToolset(LLToolset* current) { - if (!current) return; + if (!current) + return; // switching toolsets? if (current != mCurrentToolset) @@ -164,6 +165,7 @@ void LLToolMgr::setCurrentToolset(LLToolset* current) // select first tool of new toolset only if toolset changed mCurrentToolset->selectFirstTool(); } + // update current tool based on new toolset setCurrentTool( mCurrentToolset->getSelectedTool() ); } @@ -188,7 +190,7 @@ void LLToolMgr::setCurrentTool( LLTool* tool ) LLTool* LLToolMgr::getCurrentTool() { - MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; + MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0; LLTool* cur_tool = NULL; // always use transient tools if available @@ -301,7 +303,7 @@ void LLToolMgr::toggleBuildMode(const LLSD& sdname) if (gAgentCamera.getFocusOnAvatar()) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis())); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -459,7 +461,7 @@ void LLToolset::selectToolByIndex( S32 index ) } } -BOOL LLToolset::isToolSelected( S32 index ) +bool LLToolset::isToolSelected( S32 index ) { LLTool *tool = (index >= 0 && index < (S32)mToolList.size()) ? mToolList[index] : NULL; return (tool == mSelectedTool); |