diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-07-10 18:29:22 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-10 18:29:22 -0700 |
commit | 34d95fdc01690fe65ac89136cbc4782a9a22af95 (patch) | |
tree | 53a40626e6d70e3b2b33f3994ae0c64f7bffbb3d /indra/newview | |
parent | 241a446224013f76fee83e786568862068b60309 (diff) |
PATH-807: BUGFIX Filtering which objects will contain the right-click context-sensitive menu option of "Show in linksets...".
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llselectmgr.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 |
3 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 71ea5d80a9..b9449e806f 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2787,6 +2787,36 @@ BOOL LLSelectMgr::selectGetRootsNonCharacter() //----------------------------------------------------------------------------- +// selectGetEditableLinksets() - return TRUE if all objects are editable +// pathfinding linksets +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetEditableLinksets() +{ + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++ ) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if( !object || !node->mValid ) + { + return FALSE; + } + if (object->flagUsePhysics() || + object->flagTemporaryOnRez() || + object->flagCharacter() || + object->flagAnimSource() || + (!gAgent.isGodlike() && + !gAgent.canManageEstate() && + !object->permYouOwner() && + !object->permMove())) + { + return FALSE; + } + } + return TRUE; +} + +//----------------------------------------------------------------------------- // selectGetRootsTransfer() - return TRUE if current agent can transfer all // selected root objects. //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index bf40ab458f..feab6ebdf8 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -584,6 +584,8 @@ public: BOOL selectGetRootsNonCharacter(); BOOL selectGetNonCharacter(); + BOOL selectGetEditableLinksets(); + // returns TRUE if selected objects can be transferred. BOOL selectGetRootsTransfer(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 06ffd2df92..3eb0538328 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2804,7 +2804,7 @@ bool enable_object_build() bool enable_object_select_in_pathfinding_linksets() { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetNonCharacter(); + return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets(); } bool enable_object_select_in_pathfinding_characters() |