summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-07-21 17:03:00 +0300
committerPaul Guslisty <pguslisty@productengine.com>2010-07-21 17:03:00 +0300
commit258f67cd02627b8ab2b03f940f8f4fefe9f9848f (patch)
tree375596b3ee11dfdf4dfb77f8556b762656979797 /indra/newview/llpaneloutfitedit.cpp
parent576e70aab2a95da38ffd7aa780ace5ed41e12fc7 (diff)
EXT-8205 FIXED (Items in \"Add more\" panel are not sorted by name)
- Modified LLWearableItemTypeNameComparator so that it can be more reusable and adjustable - Set LLWearableItemTypeNameComparator for WearableItemsList ('List view' of 'Add More' panel) due to sort clothings by name - Modified and applied patch form https://codereview.productengine.com/secondlife/r/620/diff/2/#index_header. This patch was discarded because specification was changed Reviewed by Mike Antipov and Vadim Savchuk at https://codereview.productengine.com/secondlife/r/765/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 767b01f039..e12344ce9d 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -283,6 +283,8 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
delete mCOFDragAndDropObserver;
+ delete mWearableListViewItemsComparator;
+
while (!mListViewItemTypes.empty()) {
delete mListViewItemTypes.back();
mListViewItemTypes.pop_back();
@@ -386,11 +388,24 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
+ /*
+ * By default AT_CLOTHING are sorted by (in in MY OUTFITS):
+ * - by type (types order determined in LLWearableType::EType)
+ * - each LLWearableType::EType by outer layer on top
+ *
+ * In Add More panel AT_CLOTHING should be sorted in a such way:
+ * - by type (types order determined in LLWearableType::EType)
+ * - each LLWearableType::EType by name (EXT-8205)
+ */
+ mWearableListViewItemsComparator = new LLWearableItemTypeNameComparator();
+ mWearableListViewItemsComparator->setOrder(LLAssetType::AT_CLOTHING, LLWearableItemTypeNameComparator::ORDER_RANK_1, false, true);
+
mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("list_view");
mWearableItemsList->setCommitOnSelectionChange(true);
mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
+ mWearableItemsList->setComparator(mWearableListViewItemsComparator);
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
return TRUE;