diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-06-28 12:32:21 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-06-28 12:32:21 -0400 |
commit | 3fca4b0d61ad4534f26a8963ed6381a76e4f7c19 (patch) | |
tree | bd563f39e6bbd5984c4c529bf0252de9b94f2ea5 /indra/newview/llpaneloutfitedit.cpp | |
parent | 3ce3df564351ad7b6fb0acd4e0252b5f89f2a47e (diff) | |
parent | 8d18056e8296472d58a820fd77a6a66100e70661 (diff) |
automated merge
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 1544717873..ffd879dfd7 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -661,10 +661,13 @@ void LLPanelOutfitEdit::onInventorySelectionChange() getSelectedItemsUUID(selected_items); if (selected_items.empty()) { + mPlusBtn->setEnabled(false); return; } - uuid_vec_t::iterator worn_item = std::find_if(selected_items.begin(), selected_items.end(), boost::bind(&get_is_item_worn, _1)); - bool can_add = ( worn_item == selected_items.end() ); + + // If any of the selected items are not wearable (due to already being worn OR being of the wrong type), disable the add button. + uuid_vec_t::iterator unwearable_item = std::find_if(selected_items.begin(), selected_items.end(), !boost::bind(& get_can_item_be_worn, _1)); + bool can_add = ( unwearable_item == selected_items.end() ); mPlusBtn->setEnabled(can_add); |