summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2007-07-18 21:22:40 +0000
committerBryan O'Sullivan <bos@lindenlab.com>2007-07-18 21:22:40 +0000
commitce7682c2a468e926d6b38e4f95bd289a8d26222c (patch)
tree80535a3916676294d640b4ce47c1895d0a27cd1b /indra/newview/llselectmgr.cpp
parente1ab7d8a30cc40cbd1d471c67def21508c82ff49 (diff)
svn merge -r64837:65485 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
(only inside indra) (josh) Original log message was: svn merge -r64837:65485 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance bos updated it to be: svn merge -r64837:65269 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance However, it appears it actually was: svn merge -r64837:65485 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance ... missing some file additions.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 0ab674dfcd..54ac03a3c5 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -527,7 +527,7 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id)
return object_found;
}
-void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim)
+void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim, BOOL include_entire_object)
{
// bail if nothing selected or if object wasn't selected in the first place
if(!object) return;
@@ -535,7 +535,30 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
// Collect all of the objects, and remove them
LLDynamicArray<LLViewerObject*> objects;
- object = (LLViewerObject*)object->getRoot();
+
+ if (include_entire_object)
+ {
+ // Since we're selecting a family, start at the root, but
+ // don't include an avatar.
+ LLViewerObject* root = object;
+
+ while(!root->isAvatar() && root->getParent() && !root->isJointChild())
+ {
+ LLViewerObject* parent = (LLViewerObject*)root->getParent();
+ if (parent->isAvatar())
+ {
+ break;
+ }
+ root = parent;
+ }
+
+ object = root;
+ }
+ else
+ {
+ object = (LLViewerObject*)object->getRoot();
+ }
+
object->addThisAndAllChildren(objects);
remove(objects);
@@ -5734,6 +5757,12 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
return TRUE;
}
+BOOL LLSelectMgr::setForceSelection(BOOL force)
+{
+ std::swap(mForceSelection,force);
+ return force;
+}
+
LLObjectSelection::LLObjectSelection() :
std::list<LLSelectNode*>(),
LLRefCount(),