summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpaneloutfitedit.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index ffd879dfd7..a7e901cbfa 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -726,24 +726,36 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
bool more_than_one_selected = ids.size() > 1;
bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()));
- //resetting selection if no item is selected or than one item is selected
- if (nothing_selected || more_than_one_selected)
+ //expanded accordion tab determines filtering when no item is selected
+ if (nothing_selected)
{
- if (nothing_selected)
- {
- showWearablesFolderView();
- applyFolderViewFilter(FVIT_ALL);
- }
+ showWearablesListView();
- if (more_than_one_selected)
+ switch (mCOFWearables->getExpandedAccordionAssetType())
{
- showWearablesListView();
- applyListViewFilter(LVIT_ALL);
+ case LLAssetType::AT_OBJECT:
+ applyListViewFilter(LVIT_ATTACHMENT);
+ break;
+ case LLAssetType::AT_BODYPART:
+ applyListViewFilter(LVIT_BODYPART);
+ break;
+ case LLAssetType::AT_CLOTHING:
+ default:
+ applyListViewFilter(LVIT_CLOTHING);
+ break;
}
return;
}
+ //resetting selection if more than one item is selected
+ if (more_than_one_selected)
+ {
+ showWearablesListView();
+ applyListViewFilter(LVIT_ALL);
+ return;
+ }
+
//filter wearables by a type represented by a dummy item
if (one_selected && is_dummy_item)