summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 767b01f039..c09aff44da 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;
@@ -1012,6 +1027,18 @@ bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch
return false;
}
+void LLPanelOutfitEdit::resetAccordionState()
+{
+ if (mCOFWearables != NULL)
+ {
+ mCOFWearables->expandDefaultAccordionTab();
+ }
+ else
+ {
+ llwarns << "mCOFWearables is NULL" << llendl;
+ }
+}
+
void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button)
{
if(!mGearMenu)