summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolselect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolselect.cpp')
-rw-r--r--indra/newview/lltoolselect.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index 907cec4d17..6c9ef89d39 100644
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -49,26 +49,26 @@
#include "llworld.h"
// Globals
-//extern BOOL gAllowSelectAvatar;
+//extern bool gAllowSelectAvatar;
const F32 SELECTION_ROTATION_TRESHOLD = 0.1f;
const F32 SELECTION_SITTING_ROTATION_TRESHOLD = 3.2f; //radian
LLToolSelect::LLToolSelect( LLToolComposite* composite )
: LLTool( std::string("Select"), composite ),
- mIgnoreGroup( FALSE )
+ mIgnoreGroup( false )
{
}
// True if you selected an object.
-BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
{
// do immediate pick query
- BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
- BOOL pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects");
- BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
+ bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
+ bool pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects");
+ bool pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
- mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, FALSE, TRUE, pick_reflection_probe);
+ mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, false, true, pick_reflection_probe);
// Pass mousedown to agent
LLTool::handleMouseDown(x, y, mask);
@@ -78,25 +78,25 @@ BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
// static
-LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, BOOL ignore_group, BOOL temp_select, BOOL select_root)
+LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, bool ignore_group, bool temp_select, bool select_root)
{
LLViewerObject* object = pick.getObject();
if (select_root)
{
object = object->getRootEdit();
}
- BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly");
- BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly");
+ bool select_owned = gSavedSettings.getBOOL("SelectOwnedOnly");
+ bool select_movable = gSavedSettings.getBOOL("SelectMovableOnly");
// *NOTE: These settings must be cleaned up at bottom of function.
if (temp_select || LLSelectMgr::getInstance()->mAllowSelectAvatar)
{
- gSavedSettings.setBOOL("SelectOwnedOnly", FALSE);
- gSavedSettings.setBOOL("SelectMovableOnly", FALSE);
- LLSelectMgr::getInstance()->setForceSelection(TRUE);
+ gSavedSettings.setBOOL("SelectOwnedOnly", false);
+ gSavedSettings.setBOOL("SelectMovableOnly", false);
+ LLSelectMgr::getInstance()->setForceSelection(true);
}
- BOOL extend_select = (pick.mKeyMask == MASK_SHIFT) || (pick.mKeyMask == MASK_CONTROL);
+ bool extend_select = (pick.mKeyMask == MASK_SHIFT) || (pick.mKeyMask == MASK_CONTROL);
// If no object, check for icon, then just deselect
if (!object)
@@ -114,7 +114,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
}
else
{
- BOOL already_selected = object->isSelected();
+ bool already_selected = object->isSelected();
if (already_selected &&
object->getNumTEs() > 0 &&
@@ -141,7 +141,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
}
else
{
- LLSelectMgr::getInstance()->deselectObjectAndFamily(object, TRUE, TRUE);
+ LLSelectMgr::getInstance()->deselectObjectAndFamily(object, true, true);
}
}
else
@@ -220,7 +220,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
LLSelectNode* select_node = selection->findNode(root_object);
if (select_node)
{
- select_node->setTransient(TRUE);
+ select_node->setTransient(true);
}
LLViewerObject::const_child_list_t& child_list = root_object->getChildren();
@@ -231,7 +231,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
select_node = selection->findNode(child);
if (select_node)
{
- select_node->setTransient(TRUE);
+ select_node->setTransient(true);
}
}
@@ -244,17 +244,17 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
{
gSavedSettings.setBOOL("SelectOwnedOnly", select_owned);
gSavedSettings.setBOOL("SelectMovableOnly", select_movable);
- LLSelectMgr::getInstance()->setForceSelection(FALSE);
+ LLSelectMgr::getInstance()->setForceSelection(false);
}
return LLSelectMgr::getInstance()->getSelection();
}
-BOOL LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask)
{
mIgnoreGroup = gSavedSettings.getBOOL("EditLinkedParts");
- handleObjectSelection(mPick, mIgnoreGroup, FALSE);
+ handleObjectSelection(mPick, mIgnoreGroup, false);
return LLTool::handleMouseUp(x, y, mask);
}
@@ -263,7 +263,7 @@ void LLToolSelect::handleDeselect()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
+ setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly
}
}
@@ -272,7 +272,7 @@ void LLToolSelect::stopEditing()
{
if( hasMouseCapture() )
{
- setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
+ setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly
}
}
@@ -280,10 +280,10 @@ void LLToolSelect::onMouseCaptureLost()
{
// Finish drag
- LLSelectMgr::getInstance()->enableSilhouette(TRUE);
+ LLSelectMgr::getInstance()->enableSilhouette(true);
// Clean up drag-specific variables
- mIgnoreGroup = FALSE;
+ mIgnoreGroup = false;
}