diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-06-30 10:20:50 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-06-30 10:20:50 -0400 |
commit | 25d97201ac92dcfd8451a92368f889c9840fb2cb (patch) | |
tree | b6db1a3c33c3f6c0d967389487f19c62c0792fde /indra | |
parent | 6545a34dcd2562e4438cccb9b87c555d0709c83d (diff) | |
parent | 1c26bb6668e2011315f647359daf56a991c57261 (diff) |
Automated merge with ssh://hg.lindenlab.com/q/viewer-release/
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.h | 7 |
2 files changed, 21 insertions, 10 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ce022ac840..853369b7c8 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -188,8 +188,9 @@ public: }; -LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(): - mFireCount(0) +LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit_ordering): + mFireCount(0), + mUpdateBaseOrder(update_base_outfit_ordering) { } @@ -199,7 +200,7 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy() if (!LLApp::isExiting()) { - LLAppearanceMgr::instance().updateAppearanceFromCOF(); + LLAppearanceMgr::instance().updateAppearanceFromCOF(mUpdateBaseOrder); } } @@ -1417,7 +1418,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) // Create links to new COF contents. llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl; - LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; + LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(!append); #ifndef LL_RELEASE_FOR_DOWNLOAD llinfos << "Linking body items" << llendl; @@ -1537,11 +1538,11 @@ bool sort_by_description(const LLInventoryItem* item1, const LLInventoryItem* it return item1->LLInventoryItem::getDescription() < item2->LLInventoryItem::getDescription(); } -void LLAppearanceMgr::updateAppearanceFromCOF() +void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { //checking integrity of the COF in terms of ordering of wearables, //checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state) - updateClothingOrderingInfo(); + updateClothingOrderingInfo(LLUUID::null, update_base_outfit_ordering); // update dirty flag to see if the state of the COF matches // the saved outfit stored as a folder link @@ -2244,11 +2245,19 @@ struct WearablesOrderComparator U32 mControlSize; }; -void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id) +void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id, bool update_base_outfit_ordering) { if (cat_id.isNull()) { cat_id = getCOF(); + if (update_base_outfit_ordering) + { + const LLUUID base_outfit_id = getBaseOutfitUUID(); + if (base_outfit_id.notNull()) + { + updateClothingOrderingInfo(base_outfit_id,false); + } + } } // COF is processed if cat_id is not specified @@ -2281,6 +2290,7 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id) item->setComplete(TRUE); item->updateServer(FALSE); gInventory.updateItem(item); + inventory_changed = true; } } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 61779d5c0e..5a556a4102 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -54,7 +54,7 @@ class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> public: typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; - void updateAppearanceFromCOF(); + void updateAppearanceFromCOF(bool update_base_outfit_ordering = false); bool needToSaveCOF(); void updateCOF(const LLUUID& category, bool append = false); void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append); @@ -170,7 +170,7 @@ public: //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); + void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null, bool update_base_outfit_ordering = false); bool isOutfitLocked() { return mOutfitLocked; } @@ -224,12 +224,13 @@ public: class LLUpdateAppearanceOnDestroy: public LLInventoryCallback { public: - LLUpdateAppearanceOnDestroy(); + LLUpdateAppearanceOnDestroy(bool update_base_outfit_ordering = false); virtual ~LLUpdateAppearanceOnDestroy(); /* virtual */ void fire(const LLUUID& inv_item); private: U32 mFireCount; + bool mUpdateBaseOrder; }; |