summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-05-26 18:22:15 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-05-26 18:22:15 -0400
commitb2433a6c82980e76dfde8735d69b788d20abc9d8 (patch)
tree56598d9bec26b54d3ba1a3896ac2cf52c2af139f /indra/newview/llagentwearables.cpp
parent14b8471d448a6e591ab29d25634a32d882853212 (diff)
parentec7dbc704040dfcdcd101f090dbb2f780ca0ee8a (diff)
Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r--indra/newview/llagentwearables.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 68c4fa1ea0..1deba2e2e6 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -617,6 +617,23 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id)
return NULL;
}
+LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id)
+{
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
+ for (S32 i=0; i < LLWearableType::WT_COUNT; i++)
+ {
+ for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++)
+ {
+ LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j);
+ if (curr_wearable && (curr_wearable->getItemID() == base_item_id))
+ {
+ return curr_wearable;
+ }
+ }
+ }
+ return NULL;
+}
+
LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id)
{
for (S32 i=0; i < LLWearableType::WT_COUNT; i++)
@@ -1659,14 +1676,12 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty
void LLAgentWearables::userRemoveAllClothes()
{
// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
- if (gFloaterCustomize)
- {
- gFloaterCustomize->askToSaveIfDirty(userRemoveAllClothesStep2);
- }
- else
+ if (gAgentCamera.cameraCustomizeAvatar())
{
- userRemoveAllClothesStep2(TRUE);
+ // switching to outfit editor should automagically save any currently edited wearable
+ LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
}
+ userRemoveAllClothesStep2(TRUE);
}
// static