summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-05-20 14:05:32 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-05-20 14:05:32 +0300
commitfe641682176a4940ad5d71366f0b74f9eabe7118 (patch)
tree82f1a09547b4c92bfa405b51e4683595c0cc26bb /indra/newview/llinventorybridge.cpp
parent56e88c6b2e656a28b25154e27c05e7ced65d90a8 (diff)
parent13d2501c847929ce9ee155dbb4dcfcf166710d3e (diff)
Manual merge from default branch.
Auto-resolved conflicts in: - indra/newview/llpaneleditwearable.cpp - indra/newview/llviewermenu.cpp - indra/newview/llviewerwindow.cpp - indra/newview/skins/default/xui/en/notifications.xml --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index b9b4fa8b03..ab7eeae3e8 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4980,18 +4980,20 @@ void LLWearableBridge::removeAllClothesFromAvatar()
if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES)
continue;
- // MULTI-WEARABLES: fixed to index 0
- LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(
- gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, 0));
- if (!item)
- continue;
- const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID());
- const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
- if (!wearable)
- continue;
-
- // Find and remove this item from the COF.
- LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
+ for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index)
+ {
+ LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(
+ gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index));
+ if (!item)
+ continue;
+ const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID());
+ const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
+ if (!wearable)
+ continue;
+
+ // Find and remove this item from the COF.
+ LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
+ }
}
gInventory.notifyObservers();