diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-12-16 13:33:49 -0500 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-12-16 13:33:49 -0500 |
commit | ee80fb64afc9725a12e37e14001a15542dc7ca3d (patch) | |
tree | 29fe0d63995ea418e9aa1de8c950ecc6c4478d54 | |
parent | ace0be2a7c0665e382e47aeedfcffed7410e11a9 (diff) | |
parent | 9813df87af1d895a3183eb33648009fd70ce6ed7 (diff) |
merge with avp
--HG--
branch : avatar-pipeline
-rw-r--r-- | indra/newview/llselectmgr.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llselectmgr.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 |
3 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6e99d5a5f0..60a095506b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2277,6 +2277,26 @@ BOOL LLSelectMgr::selectGetAllValid() return TRUE; } +//----------------------------------------------------------------------------- +// selectGetAllValidAndObjectsFound() - return TRUE if selections are +// valid and objects are found. +// +// For EXT-3114 - same as selectGetModify() without the modify check. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetAllValidAndObjectsFound() +{ + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++ ) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if( !object || !node->mValid ) + { + return FALSE; + } + } + return TRUE; +} //----------------------------------------------------------------------------- // selectGetModify() - return TRUE if current agent can modify all diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 6641be335a..f8ecfd0674 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -535,6 +535,7 @@ public: // Returns TRUE if the viewer has information on all selected objects BOOL selectGetAllRootsValid(); BOOL selectGetAllValid(); + BOOL selectGetAllValidAndObjectsFound(); // returns TRUE if you can modify all selected objects. BOOL selectGetRootsModify(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index dfa775c292..93702bf5dc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2640,7 +2640,7 @@ bool enable_object_edit() enable = LLViewerParcelMgr::getInstance()->allowAgentBuild() || LLSelectMgr::getInstance()->getSelection()->isAttachment(); } - else if (LLSelectMgr::getInstance()->selectGetModify()) + else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound()) { enable = true; } |