summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-06-30 13:57:03 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-06-30 13:57:03 -0400
commitb48e1bfa8eeef547a8901cc9da6cde3b782db2c2 (patch)
treef50729d1117c19b35690ff3516bce56dd7a16db8 /indra/newview
parent1c05b8cc3269531f781f1e97260868509b757327 (diff)
parent25d97201ac92dcfd8451a92368f889c9840fb2cb (diff)
Automated merge with ssh://hg.lindenlab.com/q/viewer-release/
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.cpp24
-rw-r--r--indra/newview/llappearancemgr.h7
2 files changed, 21 insertions, 10 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 547dfd7006..3051aa3cef 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -207,8 +207,9 @@ public:
};
-LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy():
- mFireCount(0)
+LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit_ordering):
+ mFireCount(0),
+ mUpdateBaseOrder(update_base_outfit_ordering)
{
}
@@ -218,7 +219,7 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
if (!LLApp::isExiting())
{
- LLAppearanceMgr::instance().updateAppearanceFromCOF();
+ LLAppearanceMgr::instance().updateAppearanceFromCOF(mUpdateBaseOrder);
}
}
@@ -1436,7 +1437,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;
@@ -1617,7 +1618,7 @@ void LLAppearanceMgr::enforceItemCountLimits()
}
}
-void LLAppearanceMgr::updateAppearanceFromCOF()
+void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
{
if (mIsInUpdateAppearanceFromCOF)
{
@@ -1631,7 +1632,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF()
//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);
// Remove duplicate or excess wearables. Should normally be enforced at the UI level, but
// this should catch anything that gets through.
@@ -2336,11 +2337,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
@@ -2373,6 +2382,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 afd1bf3ade..8834f8c395 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);
@@ -171,7 +171,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; }
@@ -226,12 +226,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;
};