From 0459dd1e39dd0619f25e537840356f6c567f78e9 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Thu, 11 Feb 2010 15:22:38 -0500
Subject: [PATCH] EXT-5343 appearance editor "save as" does not affect Current
 outfit

changed logic of the save as button to copy a link from the newly created
inventory item to the current outfit folder. This makes your changes
persist on relog.

Reviewed by Vir.
---
 indra/newview/llagentwearables.cpp | 6 +++++-
 indra/newview/llagentwearables.h   | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 6078620e87e..a439720dcf1 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -299,6 +299,10 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i
 	{
 		gAgentWearables.makeNewOutfitDone(mType, mIndex);
 	}
+	if (mTodo & CALL_WEARITEM)
+	{
+		LLAppearanceManager::instance().addCOFItemLink(inv_item, true);
+	}
 }
 
 void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type,
@@ -510,7 +514,7 @@ void LLAgentWearables::saveWearableAs(const EWearableType type,
 			type,
 			index,
 			new_wearable,
-			addWearableToAgentInventoryCallback::CALL_UPDATE);
+			addWearableToAgentInventoryCallback::CALL_WEARITEM);
 	LLUUID category_id;
 	if (save_in_lost_and_found)
 	{
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index b4f58674af3..858540a5f59 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -244,7 +244,8 @@ class LLAgentWearables
 			CALL_UPDATE = 1,
 			CALL_RECOVERDONE = 2,
 			CALL_CREATESTANDARDDONE = 4,
-			CALL_MAKENEWOUTFITDONE = 8
+			CALL_MAKENEWOUTFITDONE = 8,
+			CALL_WEARITEM = 16
 		};
 
 		// MULTI-WEARABLE: index is an EWearableType - more confusing usage.
-- 
GitLab