From f4c20d43bc4408002206b7ec7620113cef0b8256 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Tue, 22 Jun 2010 15:00:22 +0300 Subject: EXT-7875 FIXED Implemented resetting of selection inside outfit on accordion collapse/expand. - Added method which resets selection and tied it up to DropDownStateChangedCallback. Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/628/ --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 10 ++++++++++ indra/newview/lloutfitslist.h | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index c5043e1c3d..6542afc366 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -288,6 +288,9 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // Setting tab focus callback to monitor currently selected outfit. tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id)); + // Setting callback to reset items selection inside outfit on accordion collapsing and expanding (EXT-7875) + tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::resetItemSelection, this, list, cat_id)); + // Setting list commit callback to monitor currently selected wearable item. list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1)); @@ -486,6 +489,13 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id) } } +void LLOutfitsList::resetItemSelection(LLWearableItemsList* list, const LLUUID& category_id) +{ + list->resetSelection(); + mItemSelected = false; + setSelectedOutfitUUID(category_id); +} + void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) { MASK mask = gKeyboard->currentMask(TRUE); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index df65f7187b..a6b9a66836 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -122,6 +122,11 @@ private: */ void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id); + /** + *Resets items selection inside outfit + */ + void resetItemSelection(LLWearableItemsList* list, const LLUUID& category_id); + /** * Saves newly selected outfit ID. */ -- cgit v1.2.3