From 3b9da6dc2fad17ecac782dce02ccde0e7e020aac Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 6 Feb 2018 17:36:51 +0000
Subject: [PATCH] MAINT-8004 Make replace work regardless of current
 attachments

---
 indra/newview/llappearancemgr.cpp | 2 +-
 indra/newview/lloutfitslist.cpp   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 0fb811a3867..c0f88ef7043 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1919,7 +1919,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
 	}
 
 	// Check whether it's the base outfit.
-	if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
+	if (outfit_cat_id.isNull())
 	{
 		return false;
 	}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index e2157f985e6..892fa385d7c 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -1050,15 +1050,15 @@ bool LLOutfitContextMenu::onEnable(LLSD::String param)
 bool LLOutfitContextMenu::onVisible(LLSD::String param)
 {
     LLUUID outfit_cat_id = mUUIDs.back();
-    bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id;
 
     if ("edit" == param)
     {
+        bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id;
         return is_worn;
     }
     else if ("wear_replace" == param)
     {
-        return !is_worn;
+        return true;
     }
     else if ("delete" == param)
     {
-- 
GitLab