summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
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