diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2010-08-31 19:42:46 +0300 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2010-08-31 19:42:46 +0300 |
commit | 978919227545cd96f6e1b7133c6186de80f1ff0a (patch) | |
tree | fa240b05bde041d66ff0066b89868398582eb786 /indra/newview/llcofwearables.cpp | |
parent | 049f0e1f9569ce47cc4563dcd60a0cf6fd27ed8e (diff) |
VWR-22723 Add More category picker defaults whenever a clothing item is removed
- After wearable removed from COF list, check: whether any outfit of the same wearable type as removed left in COF. If left then select it.
- Added method selectClothing(LLWearableType::EType) to the LLCOFWearables that selects first clothing from COF of specified WearableType
Reviewed by Vadim Savchuk
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r-- | indra/newview/llcofwearables.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 194d461f94..b1e11e1a2a 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -708,4 +708,25 @@ void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContex } } +void LLCOFWearables::selectClothing(LLWearableType::EType clothing_type) +{ + std::vector<LLPanel*> clothing_items; + + mClothing->getItems(clothing_items); + + std::vector<LLPanel*>::iterator it; + + for (it = clothing_items.begin(); it != clothing_items.end(); ++it ) + { + LLPanelClothingListItem* clothing_item = dynamic_cast<LLPanelClothingListItem*>(*it); + + if (clothing_item && clothing_item->getWearableType() == clothing_type) + { // clothing item has specified LLWearableType::EType. Select it and exit. + + mClothing->selectItem(clothing_item); + break; + } + } +} + //EOF |