From ba59f71d5e1469f79494a50c647d929a63888685 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 28 May 2010 12:44:28 +0300 Subject: EXT-7341 FIXED updating My Outfits with wearables ordering information on the very first login added saving ordering information for wearables of already populated My Outfits category on the very first login Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/455/ --HG-- branch : product-engine --- indra/newview/llagentwearablesfetch.cpp | 48 ++++++++++++++++++++++++++++++++- indra/newview/llappearancemgr.cpp | 10 +++++-- indra/newview/llappearancemgr.h | 7 ++--- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 43a0d48d8b..ef0b97d376 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -40,6 +40,50 @@ #include "llstartup.h" #include "llvoavatarself.h" + +class LLOrderMyOutfitsOnDestroy: public LLInventoryCallback +{ +public: + LLOrderMyOutfitsOnDestroy() {}; + + virtual ~LLOrderMyOutfitsOnDestroy() + { + const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + if (my_outfits_id.isNull()) return; + + LLInventoryModel::cat_array_t* cats; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(my_outfits_id, cats, items); + if (!cats) return; + + //My Outfits should at least contain saved initial outfit and one another outfit + if (cats->size() < 2) + { + llwarning("My Outfits category was not populated properly", 0); + return; + } + + llinfos << "Starting updating My Outfits with wearables ordering information" << llendl; + + for (LLInventoryModel::cat_array_t::iterator outfit_iter = cats->begin(); + outfit_iter != cats->end(); ++outfit_iter) + { + const LLUUID& cat_id = (*outfit_iter)->getUUID(); + if (cat_id.isNull()) continue; + + // saved initial outfit already contains wearables ordering information + if (cat_id == LLAppearanceMgr::getInstance()->getBaseOutfitUUID()) continue; + + LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(cat_id); + } + + llinfos << "Finished updating My Outfits with wearables ordering information" << llendl; + } + + /* virtual */ void fire(const LLUUID& inv_item) {}; +}; + + LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) : LLInventoryFetchDescendentsObserver(cof_id) { @@ -483,6 +527,8 @@ void LLLibraryOutfitsFetch::contentsDone() LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; + LLPointer order_myoutfits_on_destroy = new LLOrderMyOutfitsOnDestroy; + for (uuid_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin(); folder_iter != mImportedClothingFolders.end(); ++folder_iter) @@ -518,7 +564,7 @@ void LLLibraryOutfitsFetch::contentsDone() item->getName(), item->getDescription(), LLAssetType::AT_LINK, - NULL); + order_myoutfits_on_destroy); } } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e017fffa54..e90dd2ac75 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1792,10 +1792,16 @@ struct WearablesOrderComparator U32 mControlSize; }; -void LLAppearanceMgr::updateClothingOrderingInfo() +void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id) { + if (cat_id.isNull()) + { + cat_id = getCOF(); + } + + // COF is processed if cat_id is not specified LLInventoryModel::item_array_t wear_items; - getDescendentsOfAssetType(getCOF(), wear_items, LLAssetType::AT_CLOTHING, false); + getDescendentsOfAssetType(cat_id, wear_items, LLAssetType::AT_CLOTHING, false); wearables_by_type_t items_by_type(LLWearableType::WT_COUNT); divvyWearablesByType(wear_items, items_by_type); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 96541beb7d..dbde055c3a 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -154,15 +154,16 @@ public: //Divvy items into arrays by wearable type static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type); + //Check ordering information on wearables stored in links' descriptions and update if it is invalid + // COF is processed if cat_id is not specified + void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); private: - //Check ordering information on wearables stored in links' descriptions and update if it is invalid - void updateClothingOrderingInfo(); - void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type); void getDescendentsOfAssetType(const LLUUID& category, -- cgit v1.2.3 From 959e4c40cc4366729635829c5deb9d23035321b6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 28 May 2010 12:49:29 +0300 Subject: EXT-7208 PARTIAL FIXED fixed tattoo texture pickers, repositioned tattoo color picker - assigned callbacks for tattoo texture pickers - repositioned tattoo color picker Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/453/ --HG-- branch : product-engine --- .../skins/default/xui/en/panel_edit_tattoo.xml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml index 6d02dd41de..6fa9383507 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml @@ -32,7 +32,10 @@ name="Head Tattoo" tool_tip="Click to choose a picture" top="10" - width="94" /> + width="94" > + + + width="94" > + + + width="94" > + + -- cgit v1.2.3