summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-03-22 00:44:59 -0700
committerRichard Linden <none@none>2013-03-22 00:44:59 -0700
commit68f9f656cd22332e46959a90347e38f79c19a66c (patch)
tree531d87287b69f500c5901f785e60483555b415f9 /indra/newview/llselectmgr.cpp
parente87000ba0750e55d9d6b55feccc4124f5d2b4b74 (diff)
parent368dd542bec7c31e14673b83d3342c35717d2920 (diff)
merge with viewer-release
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp74
1 files changed, 36 insertions, 38 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 343316d30a..0079b3bab8 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1547,7 +1547,7 @@ void LLObjectSelection::applyNoCopyTextureToTEs(LLViewerInventoryItem* item)
}
// apply texture for the selected faces
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ add(LLStatViewer::EDIT_TEXTURE, 1);
object->setTEImage(te, image);
dialog_refresh_all();
@@ -2968,10 +2968,10 @@ struct LLSelectGetFirstTest
// continue testing.
return true;
}
-
+
bool mIdentical;
LLUUID mFirstValue;
-
+
protected:
virtual const LLUUID& getValueFromNode(LLSelectNode* node) = 0;
@@ -2982,18 +2982,18 @@ private:
void LLSelectMgr::getFirst(LLSelectGetFirstTest* test)
{
if (gSavedSettings.getBOOL("EditLinkedParts"))
- {
+{
for (LLObjectSelection::valid_iterator iter = getSelection()->valid_begin();
iter != getSelection()->valid_end(); ++iter )
- {
+ {
if (!test->checkMatchingNode(*iter))
- {
+ {
break;
}
}
- }
- else
- {
+ }
+ else
+ {
for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
iter != getSelection()->root_object_end(); ++iter )
{
@@ -3003,31 +3003,31 @@ void LLSelectMgr::getFirst(LLSelectGetFirstTest* test)
}
}
}
-}
+ }
//-----------------------------------------------------------------------------
// selectGetCreator()
// Creator information only applies to roots unless editing linked parts.
//-----------------------------------------------------------------------------
struct LLSelectGetFirstCreator : public LLSelectGetFirstTest
-{
+ {
protected:
virtual const LLUUID& getValueFromNode(LLSelectNode* node)
- {
+ {
return node->mPermissions->getCreator();
- }
+ }
};
BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
-{
+ {
LLSelectGetFirstCreator test;
getFirst(&test);
if (test.mFirstValue.isNull())
- {
- name = LLTrans::getString("AvatarNameNobody");
+ {
+ name = LLTrans::getString("AvatarNameNobody");
return FALSE;
- }
+ }
result_id = test.mFirstValue;
@@ -3048,18 +3048,18 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
// Owner information only applies to roots unless editing linked parts.
//-----------------------------------------------------------------------------
struct LLSelectGetFirstOwner : public LLSelectGetFirstTest
-{
+ {
protected:
virtual const LLUUID& getValueFromNode(LLSelectNode* node)
- {
+ {
// Don't use 'getOwnership' since we return a reference, not a copy.
// Will return LLUUID::null if unowned (which is not allowed and should never happen.)
return node->mPermissions->isGroupOwned() ? node->mPermissions->getGroup() : node->mPermissions->getOwner();
- }
+ }
};
BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name)
-{
+ {
LLSelectGetFirstOwner test;
getFirst(&test);
@@ -3098,34 +3098,34 @@ struct LLSelectGetFirstLastOwner : public LLSelectGetFirstTest
{
protected:
virtual const LLUUID& getValueFromNode(LLSelectNode* node)
- {
+{
return node->mPermissions->getLastOwner();
}
};
BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name)
-{
+ {
LLSelectGetFirstLastOwner test;
getFirst(&test);
if (test.mFirstValue.isNull())
- {
- return FALSE;
- }
+ {
+ return FALSE;
+ }
result_id = test.mFirstValue;
if (test.mIdentical)
- {
+ {
name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString();
- }
- else
- {
+ }
+ else
+ {
name.assign( "" );
- }
+ }
return test.mIdentical;
-}
+ }
//-----------------------------------------------------------------------------
// selectGetGroup()
@@ -3155,16 +3155,16 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
// Returns TRUE if the first selected is group owned.
//-----------------------------------------------------------------------------
struct LLSelectGetFirstGroupOwner : public LLSelectGetFirstTest
-{
+ {
protected:
virtual const LLUUID& getValueFromNode(LLSelectNode* node)
- {
+ {
if (node->mPermissions->isGroupOwned())
{
return node->mPermissions->getGroup();
}
return LLUUID::null;
- }
+ }
};
BOOL LLSelectMgr::selectIsGroupOwned()
@@ -3414,9 +3414,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response,
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
// Keep track of how many objects have been deleted.
- F64 obj_delete_count = LLViewerStats::getInstance()->getStat(LLViewerStats::ST_OBJECT_DELETE_COUNT);
- obj_delete_count += LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount();
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_OBJECT_DELETE_COUNT, obj_delete_count );
+ add(LLStatViewer::DELETE_OBJECT, LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount());
}
break;
case 1: