From 2af19a91d5e0c5832fcdd09d7d30b45ea44b1528 Mon Sep 17 00:00:00 2001
From: LanceCorrimal <none@none>
Date: Sat, 18 Jan 2014 17:28:34 +0100
Subject: Fixed: BUG-4413

---
 indra/newview/llappearancemgr.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index da1609297e..4c98181ef3 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1431,6 +1431,18 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
 		uuids_to_remove.push_back(item->getUUID());
 	}
 	removeItemsFromAvatar(uuids_to_remove);
+	// now deactivating all gestures in that folder
+
+	LLInventoryModel::item_array_t gest_items;
+        getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false);
+        for(S32 i = 0; i  < gest_items.count(); ++i)
+        {
+		LLViewerInventoryItem *gest_item = gest_items.get(i);
+		if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
+		{
+			LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() );
+		}
+	}
 }
 
 // Create a copy of src_id + contents as a subfolder of dst_id.
@@ -3414,6 +3426,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
 	{
 		llwarns << "called with empty list, nothing to do" << llendl;
 	}
+
 	for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
 	{
 		const LLUUID& id_to_remove = *it;
-- 
cgit v1.2.3


From b2cc4feed2e1c1ffb6360225c0169577f2f8d1ee Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 23 Jan 2014 13:41:52 -0500
Subject: correct coding style problems, add contribution credit

---
 indra/newview/llappearancemgr.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4c98181ef3..c5e98915fc 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1431,12 +1431,12 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
 		uuids_to_remove.push_back(item->getUUID());
 	}
 	removeItemsFromAvatar(uuids_to_remove);
-	// now deactivating all gestures in that folder
 
+	// deactivate all gestures in the outfit folder
 	LLInventoryModel::item_array_t gest_items;
-        getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false);
-        for(S32 i = 0; i  < gest_items.count(); ++i)
-        {
+	getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false);
+	for(S32 i = 0; i  < gest_items.count(); ++i)
+	{
 		LLViewerInventoryItem *gest_item = gest_items.get(i);
 		if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
 		{
-- 
cgit v1.2.3