diff options
| -rw-r--r-- | indra/newview/lloutfitslist.cpp | 30 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_outfit_tab.xml | 20 | 
2 files changed, 29 insertions, 21 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index bca292fa4a..03df2d2b20 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -90,17 +90,33 @@ protected:  		registrar.add("Outfit.Delete", boost::bind(deleteOutfit, selected_id));  		enable_registrar.add("Outfit.OnEnable", boost::bind(&OutfitContextMenu::onEnable, this, _2)); +		enable_registrar.add("Outfit.OnVisible", boost::bind(&OutfitContextMenu::onVisible, this, _2));  		return createFromFile("menu_outfit_tab.xml");  	} -	bool onEnable(const LLSD& data) +	bool onEnable(LLSD::String param) +	{ +		LLUUID outfit_cat_id = mUUIDs.back(); + +		if ("rename" == param) +		{ +			return get_is_category_renameable(&gInventory, outfit_cat_id); +		} + +		return true; +	} + +	bool onVisible(LLSD::String param)  	{ -		std::string param = data.asString();  		LLUUID outfit_cat_id = mUUIDs.back();  		bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id; -		if ("wear_replace" == param) +		if ("edit" == param) +		{ +			return is_worn; +		} +		else if ("wear_replace" == param)  		{  			return !is_worn;  		} @@ -112,14 +128,6 @@ protected:  		{  			return is_worn;  		} -		else if ("edit" == param) -		{ -			return is_worn; -		} -		else if ("rename" == param) -		{ -			return get_is_category_renameable(&gInventory, outfit_cat_id); -		}  		else if ("delete" == param)  		{  			return LLAppearanceMgr::instance().getCanRemoveOutfit(outfit_cat_id); diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml index 67559638d9..e084216a69 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml @@ -8,8 +8,8 @@       name="wear_replace">          <on_click           function="Outfit.WearReplace" /> -        <on_enable -         function="Outfit.OnEnable" +        <on_visible +         function="Outfit.OnVisible"           parameter="wear_replace" />      </menu_item_call>      <menu_item_call @@ -18,8 +18,8 @@       name="wear_add">          <on_click           function="Outfit.WearAdd" /> -        <on_enable -         function="Outfit.OnEnable" +        <on_visible +         function="Outfit.OnVisible"           parameter="wear_add" />      </menu_item_call>      <menu_item_call @@ -28,8 +28,8 @@       name="take_off">          <on_click           function="Outfit.TakeOff" /> -        <on_enable -         function="Outfit.OnEnable" +        <on_visible +         function="Outfit.OnVisible"           parameter="take_off" />      </menu_item_call>      <menu_item_call @@ -38,8 +38,8 @@       name="edit">          <on_click           function="Outfit.Edit" /> -        <on_enable -         function="Outfit.OnEnable" +        <on_visible +         function="Outfit.OnVisible"           parameter="edit" />      </menu_item_call>      <menu_item_separator /> @@ -59,8 +59,8 @@       name="delete">          <on_click           function="Outfit.Delete" /> -        <on_enable -         function="Outfit.OnEnable" +        <on_visible +         function="Outfit.OnVisible"           parameter="delete" />      </menu_item_call>  </context_menu>  | 
