diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-06-24 18:00:09 +0300 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-06-24 18:00:09 +0300 |
commit | a209e339ee96095e884e4de51ea5c88e51825d62 (patch) | |
tree | 80f1cc0542605d89db6e90caca9d67bc96dbecaa /indra/newview/lloutfitslist.cpp | |
parent | cb801fafb2cce28d2eecd87f011bc50eae686f1b (diff) |
EXT-7793 FIXED Implemented wearing separate wearables instead of whole outfit when individual items are selected in list.
- Added wearSelectedItems() method to LLOutfitsList which wears all items selected in outfit lists (if possible- adds, else replaces).
It is called when clicking wear if there is selection of individual items(LLOutfitsList::hasItemSelected() returns true). Otherwise
whole outfit is worn.
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/638
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index ec7fb06c8e..6c2566813f 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -960,6 +960,26 @@ void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const } } +void LLOutfitsList::wearSelectedItems() +{ + uuid_vec_t selected_uuids; + getSelectedItemsUUIDs(selected_uuids); + + if(selected_uuids.empty()) + { + return; + } + + uuid_vec_t::const_iterator it; + // Wear items from all selected lists(if possible- add, else replace) + for (it = selected_uuids.begin(); it != selected_uuids.end()-1; ++it) + { + LLAppearanceMgr::getInstance()->wearItemOnAvatar(*it, false, false); + } + // call update only when wearing last item + LLAppearanceMgr::getInstance()->wearItemOnAvatar(*it, true, false); +} + void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y) { LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); |