diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-06-11 11:51:14 -0700 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-06-11 11:51:14 -0700 |
commit | 8ea4802251cbfb4fcf112f597f4a4ff1ab0d3f1f (patch) | |
tree | 74db74b999f98cbe200d9c9e3eb1c9f58fad0062 /indra/newview/lloutfitslist.cpp | |
parent | af4a2ec0f9f4e51e186f4b386b4465f6e107b63b (diff) | |
parent | a0de40ddfa0cd318cb0b67e72e1739a706ff3a85 (diff) |
Merge
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 77db280487..e20b2e26be 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -53,6 +53,20 @@ static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y); +static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR; + +/*virtual*/ +bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const +{ + std::string name1 = tab1->getTitle(); + std::string name2 = tab2->getTitle(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + ////////////////////////////////////////////////////////////////////////// class OutfitContextMenu : public LLListContextMenu @@ -158,6 +172,7 @@ LLOutfitsList::~LLOutfitsList() BOOL LLOutfitsList::postBuild() { mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); + mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); return TRUE; } @@ -328,7 +343,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) updateOutfitTab(*items_iter); } - mAccordion->arrange(); + mAccordion->sort(); } void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) @@ -500,6 +515,8 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) void LLOutfitsList::applyFilter(const std::string& new_filter_substring) { + mAccordion->setFilterSubString(new_filter_substring); + for (outfits_map_t::iterator iter = mOutfitsMap.begin(), iter_end = mOutfitsMap.end(); |