From 4b00b988445ae562b2bc203479d7fd42ce5891d8 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 3 Aug 2010 23:28:51 +0300 Subject: EXT-8534 FIXED Fixed the 'Wear' in My Outfits being disabled for outfits consisting of body parts only. Changed the condition to enable the "Wear" button in My Outfits and the corresponding item in the outfit context menu. They now get enabled for any outfit that isn't the base outfit and contains non-worn wearables. By the way, did a minor cleanup: moved an LLAgentWearables.isCOFChangeInProgress() call to LLAppearanceMgr::getCanAddToCOF() to avoid code duplication. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/832/ --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'indra/newview/lloutfitslist.cpp') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 8147a97317..f921bca623 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -275,11 +275,10 @@ protected: } else if ("wear_replace" == param) { - return !gAgentWearables.isCOFChangeInProgress(); + return LLAppearanceMgr::instance().getCanReplaceCOF(outfit_cat_id); } else if ("wear_add" == param) { - if (gAgentWearables.isCOFChangeInProgress()) return false; return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id); } else if ("take_off" == param) @@ -676,7 +675,7 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata) } // outfit selected - return LLAppearanceMgr::getCanAddToCOF(mSelectedOutfitUUID); + return LLAppearanceMgr::instance().getCanReplaceCOF(mSelectedOutfitUUID); } if (command_name == "take_off") { @@ -689,11 +688,6 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata) if (command_name == "wear_add") { // *TODO: do we ever get here? - if (gAgentWearables.isCOFChangeInProgress()) - { - return false; - } - return LLAppearanceMgr::getCanAddToCOF(mSelectedOutfitUUID); } -- cgit v1.2.3