From baddb7154981f038ddf0218788a932d46e2b69ce Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 21 Jun 2010 15:14:42 +0300 Subject: 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 --- indra/newview/llpaneloutfitedit.cpp | 7 ++++--- indra/newview/llpaneloutfitedit.h | 2 +- indra/newview/skins/default/xui/en/panel_outfit_edit.xml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview') 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("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 &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" />