summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-07-02 17:33:33 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-07-02 17:33:33 +0300
commit41ac3f8f220f32cd36dd61a026d61345a6b9c424 (patch)
tree4e1b66d1236d757addbddd5eec91fd076b620ba5
parent589619d8ccdcc9dfb5b575e602a657c7c59b0b4a (diff)
EXT-8134 FIXED added filtering wearables depending on expanded outfit (panel outfit edit)
Add More is clicked -> list view is shown filtered depending on the expanded tab (if no item is selected), default filtering when nothing is selected and all tabs are collapsed - by clothing Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/689/ --HG-- branch : product-engine
-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)