summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-07-01 11:10:26 -0400
committerLoren Shih <seraph@lindenlab.com>2010-07-01 11:10:26 -0400
commit1cdf3146f284eb5a2c9effc6b44f060b5345f58b (patch)
treeb91633f913b5a5f8363edd8a2b4eb8b31b2466b7 /indra/newview/llpanelmaininventory.cpp
parent5436253e53da366fd81c12bd03fdb5565615b850 (diff)
EXT-8191 FIXED Find All Links shouldn't include original item
EXT-7721 FIXED Find All Links shouldn't appear when it can't be used This required adding some minor infrastructure to support including/excluding links in search.
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 9eece81861..fa7e06d323 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -392,6 +392,7 @@ void LLPanelMainInventory::onClearSearch()
{
mActivePanel->setFilterSubString(LLStringUtil::null);
mActivePanel->setFilterTypes(0xffffffff);
+ mActivePanel->setFilterLinks(LLInventoryFilter::FILTERLINK_INCLUDE_LINKS);
}
if (finder)
@@ -1068,6 +1069,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
mFilterEditor->setFocus(TRUE);
filter->setFilterUUID(item_id);
filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ filter->setFilterLinks(LLInventoryFilter::FILTERLINK_ONLY_LINKS);
}
}
@@ -1134,7 +1136,10 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "find_links")
{
- LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ LLFolderView* root = getActivePanel()->getRootFolder();
+ std::set<LLUUID> selection_set = root->getSelectionList();
+ if (selection_set.size() != 1) return FALSE;
+ LLFolderViewItem* current_item = root->getCurSelectedItem();
if (!current_item) return FALSE;
const LLUUID& item_id = current_item->getListener()->getUUID();
const LLInventoryObject *obj = gInventory.getObject(item_id);