diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-06-28 08:51:26 -0700 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-06-28 08:51:26 -0700 |
commit | 6ffe7db72018c8a0a89c209627f6b37f21f88e37 (patch) | |
tree | cfd70990ca17d47f335905355e1709140e9e2d8a /indra/newview/llpaneloutfitedit.cpp | |
parent | 81f5c0241436f3b3fb097dd38c108d110540de7a (diff) | |
parent | 8d18056e8296472d58a820fd77a6a66100e70661 (diff) |
Merged from viewer-release
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); |