summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-04-30 19:48:15 +0300
committerSergei Litovchuk <slitovchuk@productengine.com>2010-04-30 19:48:15 +0300
commitf247dc68df1ae1972a9bca14f774f9dcba75b12e (patch)
treea15f793e34bf82f3563235d7bb9f997464da9cfc
parent05c662528a6754d2d1c15d39c7605945c2b776e2 (diff)
Task (EXT-6722) Create modified inventory view for "my outfits" tab in top-level appearance sidebar
- Fixed adding category check in LLInventoryCategoriesObserver. Reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/332/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llinventoryobserver.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 86147d65e6..c24d2ee0ea 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -689,7 +689,10 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
// Unrecoverable, so just skip this category.
llassert(cats != NULL && items != NULL);
+
+ continue;
}
+
const S32 current_num_known_descendents = cats->count() + items->count();
LLCategoryData cat_data = (*iter).second;
@@ -708,11 +711,15 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
{
- S32 version;
- S32 current_num_known_descendents;
+ S32 version = LLViewerInventoryCategory::VERSION_UNKNOWN;
+ S32 current_num_known_descendents = LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN;
bool can_be_added = true;
LLViewerInventoryCategory* category = gInventory.getCategory(cat_id);
+ // If category could not be retrieved it might mean that
+ // inventory is unusable at the moment so the category is
+ // stored with VERSION_UNKNOWN and DESCENDENT_COUNT_UNKNOWN,
+ // it may be updated later.
if (category)
{
// Inventory category version is used to find out if some changes
@@ -732,16 +739,10 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t
llassert(cats != NULL && items != NULL);
}
- current_num_known_descendents = cats->count() + items->count();
- }
- else
- {
- // If category could not be retrieved it might mean that
- // inventory is unusable at the moment so the category is
- // stored with VERSION_UNKNOWN and DESCENDENT_COUNT_UNKNOWN,
- // it may be updated later.
- version = LLViewerInventoryCategory::VERSION_UNKNOWN;
- current_num_known_descendents = LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN;
+ else
+ {
+ current_num_known_descendents = cats->count() + items->count();
+ }
}
if (can_be_added)