diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-07-12 14:47:47 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-12 14:47:47 -0700 |
commit | eb00239a0b6b3177acd61a7261251cc2fdd5cb86 (patch) | |
tree | f93b52265affe5ad8a09312e0a228609b20a7054 /indra/newview/llselectmgr.cpp | |
parent | e61785a45f7ad1ace4937423f421ea1f0b956e23 (diff) |
PATH-807: Ensuring that the "Show in linksets..." and "Show in characters..." right-click menu option does not show for objects outside the current region.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index a5d9db4a00..e711a51fe8 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2806,6 +2806,7 @@ BOOL LLSelectMgr::selectGetEditableLinksets() object->flagCharacter() || object->flagVolumeDetect() || object->flagAnimSource() || + (object->getRegion() != gAgent.getRegion()) || (!gAgent.isGodlike() && !gAgent.canManageEstate() && !object->permYouOwner() && @@ -2818,6 +2819,30 @@ BOOL LLSelectMgr::selectGetEditableLinksets() } //----------------------------------------------------------------------------- +// selectGetViewableCharacters() - return TRUE if all objects are characters +// viewable within the pathfinding characters floater +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetViewableCharacters() +{ + 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->flagCharacter() || + (object->getRegion() != gAgent.getRegion())) + { + return FALSE; + } + } + return TRUE; +} + +//----------------------------------------------------------------------------- // selectGetRootsTransfer() - return TRUE if current agent can transfer all // selected root objects. //----------------------------------------------------------------------------- |