summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitslist.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-29 16:09:08 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-29 16:09:08 -0400
commit125b789239b5adb5f810b3586a95f5d5f8a17c40 (patch)
tree9650173fc466d363a9092722d04456c15b078f8d /indra/newview/lloutfitslist.cpp
parent17d2a3b9fb24ea56eb5e70007a2502bbef436a65 (diff)
parent33065ed28835f17aed22bd0d5f742bc5bb76e1a4 (diff)
merge
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r--indra/newview/lloutfitslist.cpp23
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;
}