diff options
| author | Mike Antipov <mantipov@productengine.com> | 2010-07-27 16:46:37 +0300 |
|---|---|---|
| committer | Mike Antipov <mantipov@productengine.com> | 2010-07-27 16:46:37 +0300 |
| commit | a4fcfb153049c5db68891a73c715ae57ebcb0464 (patch) | |
| tree | dbbd8aba567b6daeb1eecb7264a49fbd8bf531d8 /indra/newview/lloutfitslist.cpp | |
| parent | c8316be258cdf9252c2d1bec0f223bc4245ff205 (diff) | |
| parent | 092d49cb3a0ca090ffd792661c9cf335fec4c5c6 (diff) | |
Merge with head.
Resolved conflict in indra/newview/lloutfitslist.cpp to use changes from viewer-release.
Rejected changes in that file coming with 10f02c59761c (EXT-7015 FIXED Avoided wearing item moved to trash.) It will be refixed in a separate commit.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
| -rw-r--r-- | indra/newview/lloutfitslist.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index c3eee1d1ad..1ed7ca22f5 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -723,6 +723,29 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const } } +bool LLOutfitsList::isSelectedInTrash() +{ + bool res = false; + const LLUUID trash_id = gInventory.findCategoryUUIDForType( + LLFolderType::FT_TRASH); + + uuid_vec_t selected_uuids; + getSelectedItemsUUIDs(selected_uuids); + + for (uuid_vec_t::const_iterator it = selected_uuids.begin(); it != selected_uuids.end(); it++) + { + const LLInventoryItem* item = gInventory.getItem(*it); + if (item != NULL && gInventory.isObjectDescendentOf( + item->getLinkedUUID(), trash_id)) + { + res = true; + break; + } + } + + return res; +} + boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb) { return mSelectionChangeSignal.connect(cb); |
