summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-07-02 07:07:23 -0700
committerDessie Linden <dessie@lindenlab.com>2010-07-02 07:07:23 -0700
commit3de5be44adb91d3a7e1ff3ca8b415964a722ce49 (patch)
tree12a993fde38848529cdcdbadbce2d58cc383d7d2 /indra/newview/llappearancemgr.cpp
parent4ffcfe0a5fe21dcb49d79851eb43bd5d80623e0d (diff)
parent1417bd3985f339915f259bf5971ef21e47e30163 (diff)
Merged from viewer-release
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp36
1 files changed, 27 insertions, 9 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 547dfd7006..b5ad5c7a11 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.
@@ -1657,6 +1658,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF()
remove_non_link_items(obj_items);
remove_non_link_items(gest_items);
+ dumpItemArray(wear_items,"asset_dump: wear_item");
+ dumpItemArray(obj_items,"asset_dump: obj_item");
+
if(!wear_items.count())
{
LLNotificationsUtil::add("CouldNotPutOnOutfit");
@@ -2336,11 +2340,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 +2385,7 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id)
item->setComplete(TRUE);
item->updateServer(FALSE);
gInventory.updateItem(item);
+
inventory_changed = true;
}
}
@@ -2574,11 +2587,16 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
const std::string& msg)
{
- llinfos << msg << llendl;
for (S32 i=0; i<items.count(); i++)
{
LLViewerInventoryItem *item = items.get(i);
- llinfos << i <<" " << item->getName() << llendl;
+ LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
+ LLUUID asset_id;
+ if (linked_item)
+ {
+ asset_id = linked_item->getAssetUUID();
+ }
+ llinfos << msg << " " << i <<" " << item->getName() << " " << asset_id.asString() << llendl;
}
llinfos << llendl;
}