From b6c93cf5406cf1a6e898c072f3c900bf2d902953 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 24 Nov 2009 17:11:26 -0500
Subject: For EXT-2584: Select and rename new folder when creating new outfit;
 currently works for new outfit created in side panel, but not in appearance
 editor

--HG--
branch : avatar-pipeline
---
 indra/newview/llpaneloutfitsinventory.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index e66a4440e9..5af26c1ad9 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -144,17 +144,20 @@ void LLPanelOutfitsInventory::onNew()
 {
 	const std::string& outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);
 	LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name);
-	/*
+
 	getRootFolder()->setSelectionByID(outfit_folder, TRUE);
 	getRootFolder()->setNeedsAutoRename(TRUE);
-	getRootFolder()->startRenamingSelectedItem();
-	*/
 }
 
 void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
 	updateListCommands();
 	updateParent();
+	if (getRootFolder()->needsAutoRename())
+	{
+		getRootFolder()->startRenamingSelectedItem();
+		getRootFolder()->setNeedsAutoRename(FALSE);
+	}
 }
 
 void LLPanelOutfitsInventory::onSelectorButtonClicked()
-- 
cgit v1.2.3