aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-05-10 12:44:23 -0700
committerMcCabe Maxsted2011-06-08 22:00:29 -0700
commita3f818336cf4aa6de78aab144bb7b2b11b617822 (patch)
tree9fb270edfb91d6a97b6a7a965db67d687062dbe0 /linden/indra/newview
parentFixed unitiliazed variables in llinventorymodel class (diff)
downloadmeta-impy-a3f818336cf4aa6de78aab144bb7b2b11b617822.zip
meta-impy-a3f818336cf4aa6de78aab144bb7b2b11b617822.tar.gz
meta-impy-a3f818336cf4aa6de78aab144bb7b2b11b617822.tar.bz2
meta-impy-a3f818336cf4aa6de78aab144bb7b2b11b617822.tar.xz
Committing fix for #0000302: inventory reloads on every login. Needs more testing than just a few people
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/llinventorymodel.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp
index 962b93d..9794dfa 100644
--- a/linden/indra/newview/llinventorymodel.cpp
+++ b/linden/indra/newview/llinventorymodel.cpp
@@ -2093,14 +2093,18 @@ bool LLInventoryModel::loadSkeleton(const LLInventoryModel::options_t& options,
2093 continue; 2093 continue;
2094 } 2094 }
2095 2095
2096 if (cat->getVersion() != tcat->getVersion()) 2096 // We insert them anyway to keep the cache from breaking.
2097 // If we delete or add a folder (aka "category") then the server
2098 // increments the version and we reload the items on next login anyway
2099 // this *may* result in duplicates that are cleared on relog-- MC
2100 /*if (cat->getVersion() != tcat->getVersion())
2097 { 2101 {
2098 // if the cached version does not match the server version, 2102 // if the cached version does not match the server version,
2099 // throw away the version we have so we can fetch the 2103 // throw away the version we have so we can fetch the
2100 // correct contents the next time the viewer opens the folder. 2104 // correct contents the next time the viewer opens the folder.
2101 tcat->setVersion(NO_VERSION); 2105 tcat->setVersion(NO_VERSION);
2102 } 2106 }
2103 else 2107 else*/
2104 { 2108 {
2105 cached_ids.insert(tcat->getUUID()); 2109 cached_ids.insert(tcat->getUUID());
2106 } 2110 }
@@ -2126,12 +2130,11 @@ bool LLInventoryModel::loadSkeleton(const LLInventoryModel::options_t& options,
2126 // Add all the items loaded which are parented to a 2130 // Add all the items loaded which are parented to a
2127 // category with a correctly cached parent 2131 // category with a correctly cached parent
2128 count = items.count(); 2132 count = items.count();
2129 cat_map_t::iterator unparented = mCategoryMap.end();
2130 for (int i = 0; i < count; ++i) 2133 for (int i = 0; i < count; ++i)
2131 { 2134 {
2132 cat_map_t::iterator cit = mCategoryMap.find(items[i]->getParentUUID()); 2135 cat_map_t::iterator cit = mCategoryMap.find(items[i]->getParentUUID());
2133 2136
2134 if (cit != unparented) 2137 if (cit != mCategoryMap.end())
2135 { 2138 {
2136 LLViewerInventoryCategory* cat = cit->second; 2139 LLViewerInventoryCategory* cat = cit->second;
2137 if (cat->getVersion() != NO_VERSION) 2140 if (cat->getVersion() != NO_VERSION)