diff options
| author | Merov Linden <merov@lindenlab.com> | 2010-09-16 10:35:58 -0700 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2010-09-16 10:35:58 -0700 | 
| commit | 128bcffb62e050d9cbb84af859e45477e8d90ee8 (patch) | |
| tree | 591dbe782f3b6de1c13083ab6ebdda608b5d0d56 /indra/newview | |
| parent | ab199473f72cee8020ff4c650c451f9881246a68 (diff) | |
| parent | 4495dd26f80936f9af15457f1b11ddd502cc71fe (diff) | |
STORM-183 : Pull and merge in viewer-development
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/lloutfitslist.cpp | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index cf0b3d94bd..0d27abac17 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -85,7 +85,7 @@ public:  		registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); -		enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitsList::isActionEnabled, mOutfitList, _2)); +		enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitListGearMenu::onEnable, this, _2));  		enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2));  		mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>( @@ -209,6 +209,20 @@ private:  		LLAgentWearables::createWearable(type, true);  	} +	bool onEnable(LLSD::String param) +	{ +		// Handle the "Wear - Replace Current Outfit" menu option specially +		// because LLOutfitList::isActionEnabled() checks whether it's allowed +		// to wear selected outfit OR selected items, while we're only +		// interested in the outfit (STORM-183). +		if ("wear" == param) +		{ +			return LLAppearanceMgr::instance().getCanReplaceCOF(mOutfitList->getSelectedOutfitUUID()); +		} + +		return mOutfitList->isActionEnabled(param); +	} +  	bool onVisible(LLSD::String param)  	{  		const LLUUID& selected_outfit_id = getSelectedOutfitID(); | 
