diff options
author | Sam Kolb <skolb@lindenlab.com> | 2007-08-30 22:11:52 +0000 |
---|---|---|
committer | Sam Kolb <skolb@lindenlab.com> | 2007-08-30 22:11:52 +0000 |
commit | b2595c369f78b6613e329274f5ca7c43c4ddeda0 (patch) | |
tree | 4db6ae8237692b570b6e5dad489f3da24c5aa3fe /indra/newview/llselectmgr.cpp | |
parent | 84ea29c69c320573c7547f028b5325382e195cc6 (diff) |
Merge sl-search-opt-in back into the release branch
Reviewed by Josh and Don
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 341dec4115..2e67112e3e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1997,6 +1997,43 @@ BOOL LLSelectMgr::selectionGetMaterial(U8 *out_material) return identical; } + +bool LLSelectMgr::selectionGetIncludeInSearch(bool* include_in_search_out) +{ + LLViewerObject *object = mSelectedObjects->getFirstRootObject(); + if (!object) return FALSE; + + bool include_in_search = object->getIncludeInSearch(); + + bool identical = true; + for ( object = mSelectedObjects->getFirstRootObject(); object; object = mSelectedObjects->getNextRootObject() ) + { + if ( include_in_search != object->getIncludeInSearch()) + { + identical = false; + break; + } + } + + *include_in_search_out = include_in_search; + return identical; +} + +void LLSelectMgr::selectionSetIncludeInSearch(bool include_in_search) +{ + LLViewerObject* object = NULL; + for ( object = mSelectedObjects->getFirstRootObject(); object; object = mSelectedObjects->getNextRootObject() ) + { + object->setIncludeInSearch(include_in_search); + } + sendListToRegions( + "ObjectIncludeInSearch", + packAgentAndSessionID, + packObjectIncludeInSearch, + &include_in_search, + SEND_ONLY_ROOTS); +} + BOOL LLSelectMgr::selectionGetClickAction(U8 *out_action) { LLViewerObject *object = mSelectedObjects->getFirstObject(); @@ -4022,6 +4059,13 @@ void LLSelectMgr::packObjectClickAction(LLSelectNode* node, void *user_data) gMessageSystem->addU8("ClickAction", node->getObject()->getClickAction()); } +void LLSelectMgr::packObjectIncludeInSearch(LLSelectNode* node, void *user_data) +{ + gMessageSystem->nextBlockFast(_PREHASH_ObjectData); + gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, node->getObject()->getLocalID() ); + gMessageSystem->addBOOL("IncludeInSearch", node->getObject()->getIncludeInSearch()); +} + // static void LLSelectMgr::packObjectLocalID(LLSelectNode* node, void *) { |