Skip to content
Snippets Groups Projects
Commit f247dc68 authored by Sergei Litovchuk's avatar Sergei Litovchuk
Browse files

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
parent 05c66252
No related branches found
No related tags found
No related merge requests found
...@@ -689,7 +689,10 @@ void LLInventoryCategoriesObserver::changed(U32 mask) ...@@ -689,7 +689,10 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
// Unrecoverable, so just skip this category. // Unrecoverable, so just skip this category.
llassert(cats != NULL && items != NULL); llassert(cats != NULL && items != NULL);
continue;
} }
const S32 current_num_known_descendents = cats->count() + items->count(); const S32 current_num_known_descendents = cats->count() + items->count();
LLCategoryData cat_data = (*iter).second; LLCategoryData cat_data = (*iter).second;
...@@ -708,11 +711,15 @@ void LLInventoryCategoriesObserver::changed(U32 mask) ...@@ -708,11 +711,15 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb) bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
{ {
S32 version; S32 version = LLViewerInventoryCategory::VERSION_UNKNOWN;
S32 current_num_known_descendents; S32 current_num_known_descendents = LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN;
bool can_be_added = true; bool can_be_added = true;
LLViewerInventoryCategory* category = gInventory.getCategory(cat_id); 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) if (category)
{ {
// Inventory category version is used to find out if some changes // Inventory category version is used to find out if some changes
...@@ -732,16 +739,10 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t ...@@ -732,16 +739,10 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t
llassert(cats != NULL && items != NULL); llassert(cats != NULL && items != NULL);
} }
current_num_known_descendents = cats->count() + items->count(); else
} {
else current_num_known_descendents = cats->count() + items->count();
{ }
// 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;
} }
if (can_be_added) if (can_be_added)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment