diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-09-23 12:30:59 +0300 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-09-23 12:30:59 +0300 |
| commit | 10a2519e737d2fc4be74e7bb289d0b3eb0709aa0 (patch) | |
| tree | 42c64951a6d68b8a6e2039359c3a98a3d40b9a55 /indra/newview/llinventoryfilter.cpp | |
| parent | f392ddab9884b97ce9488614cc3fa6f10b8ebdc2 (diff) | |
Revert "SL-13852 Add visibility options to inventory search results"
This reverts commit 18566c502398e0e449717a06b1ffae3966e55522.
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
| -rw-r--r-- | indra/newview/llinventoryfilter.cpp | 85 |
1 files changed, 1 insertions, 84 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 1b99c90d5c..8f18de0210 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -63,8 +63,7 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p) mPermissions(p.permissions), mFilterTypes(p.types), mFilterUUID(p.uuid), - mFilterLinks(p.links), - mSearchVisibility(0xffffFFFFffffFFFFULL) + mFilterLinks(p.links) { } @@ -155,7 +154,6 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item) passed = passed && checkAgainstPermissions(listener); passed = passed && checkAgainstFilterLinks(listener); passed = passed && checkAgainstCreator(listener); - passed = passed && checkAgainstSearchVisibility(listener); return passed; } @@ -552,27 +550,6 @@ bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory } } -bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const -{ - if (!listener || !hasFilterString()) return TRUE; - - const LLUUID object_id = listener->getUUID(); - const LLInventoryObject *object = gInventory.getObject(object_id); - if (!object) return TRUE; - - const BOOL is_link = object->getIsLinkType(); - if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0)) - return FALSE; - - if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0)) - return FALSE; - - if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0)) - return FALSE; - - return TRUE; -} - const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const { return mFilterSubString; @@ -741,61 +718,6 @@ void LLInventoryFilter::setFilterMarketplaceListingFolders(bool select_only_list } } - -void LLInventoryFilter::toggleSearchVisibilityLinks() -{ - bool hide_links = mFilterOps.mSearchVisibility & VISIBILITY_LINKS; - if (hide_links) - { - mFilterOps.mSearchVisibility &= ~VISIBILITY_LINKS; - } - else - { - mFilterOps.mSearchVisibility |= VISIBILITY_LINKS; - } - - if (hasFilterString()) - { - setModified(hide_links ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); - } -} - -void LLInventoryFilter::toggleSearchVisibilityTrash() -{ - bool hide_trash = mFilterOps.mSearchVisibility & VISIBILITY_TRASH; - if (hide_trash) - { - mFilterOps.mSearchVisibility &= ~VISIBILITY_TRASH; - } - else - { - mFilterOps.mSearchVisibility |= VISIBILITY_TRASH; - } - - if (hasFilterString()) - { - setModified(hide_trash ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); - } -} - -void LLInventoryFilter::toggleSearchVisibilityLibrary() -{ - bool hide_library = mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY; - if (hide_library) - { - mFilterOps.mSearchVisibility &= ~VISIBILITY_LIBRARY; - } - else - { - mFilterOps.mSearchVisibility |= VISIBILITY_LIBRARY; - } - - if (hasFilterString()) - { - setModified(hide_library ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); - } -} - void LLInventoryFilter::setFilterNoMarketplaceFolder() { mFilterOps.mFilterTypes |= FILTERTYPE_NO_MARKETPLACE_ITEMS; @@ -1427,11 +1349,6 @@ U64 LLInventoryFilter::getFilterSettingsTypes() const return mFilterOps.mFilterSettingsTypes; } -U64 LLInventoryFilter::getSearchVisibilityTypes() const -{ - return mFilterOps.mSearchVisibility; -} - bool LLInventoryFilter::hasFilterString() const { return mFilterSubString.size() > 0; |
