From 2e2026a4f8359aba26e330fc8ec9ce4a3d40e666 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Fri, 8 Feb 2013 20:51:02 -0800
Subject: [PATCH] CHUI-746 : Fixed! Undid the MAINT-2276 hack now that submenus
 do work thanks to CHUI-682

---
 indra/newview/llpaneloutfitedit.cpp                 | 13 +++----------
 .../newview/skins/default/xui/en/menu_cof_gear.xml  |  2 +-
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 30f137bdba9..c09d4393c81 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -186,11 +186,8 @@ class LLPanelOutfitEditGearMenu
 	// Populate the menu with items like "New Skin", "New Pants", etc.
 	static void populateCreateWearableSubmenus(LLMenuGL* menu)
 	{
-        // MAINT-2276...these menus are created as dummies because they are not available
-        // when this function is called. This prevents their parent from popping up later.
-        //
-		//LLView* menu_clothes	= gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
-		//LLView* menu_bp			= gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE);
+		LLView* menu_clothes	= gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
+		LLView* menu_bp			= gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE);
 
 		for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
 		{
@@ -203,11 +200,7 @@ class LLPanelOutfitEditGearMenu
 			p.on_click.function_name = "Wearable.Create";
 			p.on_click.parameter = LLSD(type_name);
 
-            //LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
-            // This is a work-around for MAINT-2276 wherein the parent toggleable menu does not appear
-            // It puts everything under one menu, but that menu appears, which is better than not.
-            // 
-			LLView* parent =  menu;
+            LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
 			LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
 		}
 	}
diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
index a6e9a40e314..45cf780557b 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
@@ -9,5 +9,5 @@
     <menu
      label="New Body Parts"
      layout="topleft"
-     name="COF.Geear.New_Body_Parts" />
+     name="COF.Gear.New_Body_Parts" />
 </toggleable_menu>
-- 
GitLab