diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-06-28 10:23:03 -0700 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-06-28 10:23:03 -0700 |
| commit | 49209dfd7123515d76f9598149c1c724d0c0825a (patch) | |
| tree | 6637f56b9b25973739e597883ee3ebca3019088b /indra/newview/lloutfitslist.cpp | |
| parent | adc29e9b9f4d88cd6adfd27b3b516c069f84693c (diff) | |
| parent | 3fca4b0d61ad4534f26a8963ed6381a76e4f7c19 (diff) | |
Merge
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
| -rw-r--r-- | indra/newview/lloutfitslist.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 6c2566813f..075cfa0543 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -88,6 +88,8 @@ public: registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); + registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); + enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitsList::isActionEnabled, mOutfitList, _2)); enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2)); @@ -146,6 +148,16 @@ private: } } + void onAdd() + { + const LLUUID& selected_id = getSelectedOutfitID(); + + if (selected_id.notNull()) + { + LLAppearanceMgr::getInstance()->addCategoryToCurrentOutfit(selected_id); + } + } + void onTakeOff() { // Take off selected items if there are any @@ -648,6 +660,17 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata) && LLAppearanceMgr::getInstance()->getBaseOutfitUUID() == mSelectedOutfitUUID ) || hasWornItemSelected(); } + + if (command_name == "wear_add") + { + if (gAgentWearables.isCOFChangeInProgress()) + { + return false; + } + + return LLAppearanceMgr::getCanAddToCOF(mSelectedOutfitUUID); + } + return false; } |
