diff options
| author | Dessie Linden <dessie@lindenlab.com> | 2010-06-23 10:46:05 -0700 |
|---|---|---|
| committer | Dessie Linden <dessie@lindenlab.com> | 2010-06-23 10:46:05 -0700 |
| commit | 6c57abb295447f2b44eb833cb77fa718dc2b1118 (patch) | |
| tree | 0d9e147ed0b6bbde05e7b9550386114a13416c10 /indra/newview/llpaneloutfitsinventory.cpp | |
| parent | 87082996e6408919591ee3d408918a4425494dc9 (diff) | |
| parent | af914e4ab666aad041aa17f6459d1ff834440b44 (diff) | |
Merged from q/viewer-release
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
| -rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 714d9cd4c5..d382c77430 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -86,6 +86,7 @@ public: registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); + registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); @@ -158,6 +159,15 @@ private: } } + void onRename() + { + const LLUUID& selected_outfit_id = getSelectedOutfitID(); + if (selected_outfit_id.notNull()) + { + LLAppearanceMgr::instance().renameOutfit(selected_outfit_id); + } + } + void onDelete() { const LLUUID& selected_outfit_id = getSelectedOutfitID(); @@ -187,7 +197,11 @@ private: return false; } - if ("delete" == param) + if ("rename" == param) + { + return get_is_category_renameable(&gInventory, selected_outfit_id); + } + else if ("delete" == param) { return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } |
