diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2010-05-27 13:24:06 +0300 |
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2010-05-27 13:24:06 +0300 |
| commit | 07dba9ae377d216e049aa9c3019bc51571b48488 (patch) | |
| tree | 2308fa0731235bc36bc424490feb43e9bdfc18f9 /indra/newview/llagentwearablesfetch.cpp | |
| parent | 990e31bb692b62e05f6065b04207acb8ca50cce4 (diff) | |
EXT-7422 FIXED saving initial outfit in My Outfits on very first login
added saving initial outfit in My Outfits when wearables got loaded
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/450/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llagentwearablesfetch.cpp')
| -rw-r--r-- | indra/newview/llagentwearablesfetch.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 03d09a3798..43a0d48d8b 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -37,6 +37,7 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventoryfunctions.h" +#include "llstartup.h" #include "llvoavatarself.h" LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) : @@ -260,8 +261,11 @@ void LLLibraryOutfitsFetch::folderDone() LLInventoryModel::item_array_t wearable_array; gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH); - // Early out if we already have items in My Outfits. - if (cat_array.count() > 0 || wearable_array.count() > 0) + + // Early out if we already have items in My Outfits + // except the case when My Outfits contains just initial outfit + if (cat_array.count() > 1 || + cat_array.count() == 1 && cat_array[0]->getUUID() != LLAppearanceMgr::getInstance()->getBaseOutfitUUID()) { mOutfitsPopulated = true; return; @@ -272,6 +276,7 @@ void LLLibraryOutfitsFetch::folderDone() // If Library->Clothing->Initial Outfits exists, use that. LLNameCategoryCollector matchFolderFunctor("Initial Outfits"); + cat_array.clear(); gInventory.collectDescendentsIf(mLibraryClothingID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, @@ -489,6 +494,9 @@ void LLLibraryOutfitsFetch::contentsDone() llwarns << "Library folder import for uuid:" << folder_id << " failed to find folder." << llendl; continue; } + + //initial outfit should be already in My Outfits + if (cat->getName() == LLStartUp::getInitialOutfitName()) continue; // First, make a folder in the My Outfits directory. LLUUID new_outfit_folder_id = gInventory.createNewCategory(mMyOutfitsID, LLFolderType::FT_OUTFIT, cat->getName()); |
