summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index af1c93f383..67240ac7e7 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -529,7 +529,11 @@ BOOL get_is_item_worn(const LLUUID& id)
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
return FALSE;
-
+
+ if (item->getIsLinkType() && !gInventory.getItem(item->getLinkedUUID()))
+ {
+ return FALSE;
+ }
// Consider the item as worn if it has links in COF.
if (LLAppearanceMgr::instance().isLinkedInCOF(id))
{
@@ -787,7 +791,7 @@ void show_item_original(const LLUUID& item_uuid)
LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
if (main_inventory)
{
- main_inventory->resetFilters();
+ main_inventory->resetAllItemsFilters();
}
reset_inventory_filter();
@@ -795,6 +799,7 @@ void show_item_original(const LLUUID& item_uuid)
{
LLFloaterReg::toggleInstanceOrBringToFront("inventory");
}
+ sidepanel_inventory->showInventoryPanel();
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
if (gInventory.isObjectDescendentOf(gInventory.getLinkedItemID(item_uuid), inbox_id))
@@ -2650,7 +2655,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
else
{
- std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids));
+ for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(), end_it = selected_items.end();
+ it != end_it;
+ ++it)
+ {
+ ids.push_back(static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID());
+ }
}
// Check for actions that get handled in bulk
@@ -2711,7 +2721,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
else if ("ungroup_folder_items" == action)
{
- if (selected_uuid_set.size() == 1)
+ if (ids.size() == 1)
{
LLInventoryCategory* inv_cat = gInventory.getCategory(*ids.begin());
if (!inv_cat || LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType()))