summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-11 20:27:29 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-11 20:27:29 -0500
commit7e74e18548d9b508e3d4c3233044302742942eba (patch)
tree82d68840c492407c9cec88c4ef7317cf97d7e716 /indra/newview/llinventorymodel.cpp
parent02943eca33a2cb5be39025557ca6e7aca30ea93a (diff)
Fix for EXT-2244 - Auto fill the My Outfits folder from library/clothing if empty
-Reviewed by Seraph
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 4b7e364cf9..cc7a1ae14e 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -321,10 +321,10 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id)
// specifies 'type' as what it defaults to containing. The category is
// not necessarily only for that type. *NOTE: This will create a new
// inventory category on the fly if one does not exist.
-const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder)
+const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder, bool find_in_library)
{
- const LLUUID &rv = findCatUUID(t);
- if(rv.isNull() && isInventoryUsable() && create_folder)
+ const LLUUID &rv = findCatUUID(t, find_in_library);
+ if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library))
{
const LLUUID &root_id = gInventory.getRootFolderID();
if(root_id.notNull())
@@ -337,9 +337,9 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bo
// Internal method which looks for a category with the specified
// preferred type. Returns LLUUID::null if not found.
-const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type) const
+const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type, bool find_in_library) const
{
- const LLUUID &root_id = gInventory.getRootFolderID();
+ const LLUUID &root_id = (find_in_library) ? gInventory.getLibraryRootFolderID() : gInventory.getRootFolderID();
if(LLFolderType::FT_CATEGORY == preferred_type)
{
return root_id;