diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-04-19 09:51:36 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-04-19 09:51:36 -0400 |
commit | fc216d63254c5c646c4ec88352c5190d9709f9d7 (patch) | |
tree | 57255597a58618dee1fb742ec437b175521ec92d /indra/newview/llinventorymodel.cpp | |
parent | b29e6f656eb28d557ef4488a022b6757a58d29e1 (diff) | |
parent | 7b52a41e34e1fefd751d69be708b23df59774c6a (diff) |
merge
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llinventorymodel.cpp | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 8d7478233a..bbf284147a 100644..100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -624,8 +624,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, cat_array_t& cats, item_array_t& items, BOOL include_trash, - LLInventoryCollectFunctor& add, - BOOL follow_folder_links) + LLInventoryCollectFunctor& add) { // Start with categories if(!include_trash) @@ -652,36 +651,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, LLViewerInventoryItem* item = NULL; item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id); - // Follow folder links recursively. Currently never goes more - // than one level deep (for current outfit support) - // Note: if making it fully recursive, need more checking against infinite loops. - if (follow_folder_links && item_array) - { - S32 count = item_array->count(); - for(S32 i = 0; i < count; ++i) - { - item = item_array->get(i); - if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER) - { - LLViewerInventoryCategory *linked_cat = item->getLinkedCategory(); - if (linked_cat && linked_cat->getPreferredType() != LLFolderType::FT_OUTFIT) - // BAP - was - // LLAssetType::lookupIsEnsembleCategoryType(linked_cat->getPreferredType())) - // Change back once ensemble typing is in place. - { - if(add(linked_cat,NULL)) - { - // BAP should this be added here? May not - // matter if it's only being used in current - // outfit traversal. - cats.put(LLPointer<LLViewerInventoryCategory>(linked_cat)); - } - collectDescendentsIf(linked_cat->getUUID(), cats, items, include_trash, add, FALSE); - } - } - } - } - // Move onto items if(item_array) { @@ -1171,8 +1140,14 @@ void LLInventoryModel::deleteObject(const LLUUID& id) mParentChildCategoryTree.erase(id); } addChangedMask(LLInventoryObserver::REMOVE, id); + bool is_link_type = obj->getIsLinkType(); obj = NULL; // delete obj - updateLinkedObjectsFromPurge(id); + // Can't have links to links, so there's no need for this update + // if the item removed is a link. + if (!is_link_type) + { + updateLinkedObjectsFromPurge(id); + } gInventory.notifyObservers(); } |