diff options
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ffd879dfd7..053c2d9498 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) @@ -761,7 +773,7 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) return; } - if (one_selected && !is_dummy_item) + if (item && one_selected && !is_dummy_item) { if (item->isWearableType()) { |