summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-06-21 15:14:42 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-06-21 15:14:42 +0300
commitbaddb7154981f038ddf0218788a932d46e2b69ce (patch)
tree8f4cb82897588715127891f1b97f20b7659fc85b /indra
parentfc3c0cfcc88c11291512991d670ab848a2226887 (diff)
EXT-7822 WIP changed the default plus button action from add to replace
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/617 --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp7
-rw-r--r--indra/newview/llpaneloutfitedit.h2
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml2
3 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 7a588193c8..6b5eb23a9b 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -371,7 +371,7 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this));
- childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this));
+ childSetAction("plus_btn", boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
mEditWearableBtn->setEnabled(FALSE);
@@ -557,7 +557,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
}
-void LLPanelOutfitEdit::onAddToOutfitClicked(void)
+void LLPanelOutfitEdit::onPlusBtnClicked(void)
{
LLUUID selected_id;
if (mInventoryItemsPanel->getVisible())
@@ -577,7 +577,8 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void)
if (selected_id.isNull()) return;
- LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id);
+ //replacing instead of adding the item
+ LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id, true, true);
}
void LLPanelOutfitEdit::onAddWearableClicked(void)
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 484f3fcb9f..f449fbca27 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -146,7 +146,7 @@ public:
void onListViewFilterCommitted(LLUICtrl* ctrl);
void onSearchEdit(const std::string& string);
void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
- void onAddToOutfitClicked(void);
+ void onPlusBtnClicked(void);
void applyFolderViewFilter(EFolderViewItemType type);
void applyListViewFilter(EListViewItemType type);
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 80fbb66ff4..819ba7f878 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -459,7 +459,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
label=""
layout="topleft"
left_pad="1"
- name="add_to_outfit_btn"
+ name="plus_btn"
top="1"
width="31" />
<icon