summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index bc33f29c33..d9ee3f8bf4 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1007,7 +1007,8 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
return;
}
- if (preferred_type != LLFolderType::FT_NONE)
+ if (preferred_type != LLFolderType::FT_NONE
+ && preferred_type != LLFolderType::FT_OUTFIT)
{
// Ultimately this should only be done for non-singleton
// types. Requires back-end changes to guarantee that others
@@ -1282,6 +1283,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
{
for (auto& cat : *cat_array)
{
+ if (add.exceedsLimit())
+ {
+ break;
+ }
if(add(cat,NULL))
{
cats.push_back(cat);
@@ -1297,6 +1302,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
{
for (auto& item : *item_array)
{
+ if (add.exceedsLimit())
+ {
+ break;
+ }
if(add(NULL, item))
{
items.push_back(item);
@@ -2767,6 +2776,7 @@ bool LLInventoryModel::loadSkeleton(
bool is_cache_obsolete = false;
if (loadFromFile(inventory_filename, categories, items, categories_to_update, is_cache_obsolete))
{
+ LL_PROFILE_ZONE_NAMED("loadFromFile");
// We were able to find a cache of files. So, use what we
// found to generate a set of categories we should add. We
// will go through each category loaded and if the version
@@ -3500,7 +3510,9 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
{
if (cat->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN)
{
- fileXML << LLSDOStreamer<LLSDNotationFormatter>(cat->exportLLSD()) << std::endl;
+ LLSD sd = LLSD::emptyMap();
+ cat->exportLLSD(sd);
+ fileXML << LLSDOStreamer<LLSDNotationFormatter>(sd) << std::endl;
cat_count++;
}
@@ -3514,7 +3526,9 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
auto it_count = items.size();
for (auto& item : items)
{
- fileXML << LLSDOStreamer<LLSDNotationFormatter>(item->asLLSD()) << std::endl;
+ LLSD sd = LLSD::emptyMap();
+ item->asLLSD(sd);
+ fileXML << LLSDOStreamer<LLSDNotationFormatter>(sd) << std::endl;
if (fileXML.fail())
{
@@ -3526,7 +3540,7 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
fileXML.close();
- LL_INFOS(LOG_INV) << "Inventory saved: " << cat_count << " categories, " << it_count << " items." << LL_ENDL;
+ LL_INFOS(LOG_INV) << "Inventory saved: " << (S32)cat_count << " categories, " << (S32)it_count << " items." << LL_ENDL;
}
catch (...)
{