diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2010-08-06 19:41:23 +0300 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2010-08-06 19:41:23 +0300 |
commit | c187fdcf1fbac21cb7292d6269023eae83cb6847 (patch) | |
tree | e37d6bf61115c4117f33fd4d8a3ac1a246074042 | |
parent | 4f91a84c40dd820e08a322310ab403b07d7c985a (diff) |
EXT-7963 FIXED (Edit Outfit > Add More > Do not switch to next item type after add/replace)
- Added selected item type (in flat list view) as criterion when determining filter type in 'Add More' panel
- Fixed LLAccordionCtrl::getSelectedTab() method. When 'selection_enabled = false' for LLAccordionCtrlTab, LLAccordionCtrl::getSelectedTab() returned NULL, even if some accordion tab was selected. Now it's OK. Method returns currently selected LLAccordionCtrlTab.
Recovered from bad merge in 13811
Reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/790/
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 07a66eaf10..d7a46f30b0 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -809,15 +809,38 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) bool more_than_one_selected = ids.size() > 1; bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem())); - //selected and expanded accordion tabs determine filtering when no item is selected + // selected, expanded accordion tabs and selection in flat list view determine filtering when no item is selected in COF + // selection in flat list view participates in determining filtering because of EXT-7963 + // So the priority of criterions in is: + // 1. Selected accordion tab | IF (any accordion selected) + // | filter_type = selected_accordion_type + // 2. Selected item in flat list view | ELSEIF (any item in flat list view selected) + // | filter_type = selected_item_type + // 3. Expanded accordion tab | ELSEIF (any accordion expanded) + // | filter_type = expanded accordion_type if (nothing_selected) { showWearablesListView(); - //selected accordion tab is more priority than expanded tab when determining filtering + //selected accordion tab is more priority than expanded tab + //and selected item in flat list view of 'Add more' panel when + //determining filtering LLAssetType::EType type = mCOFWearables->getSelectedAccordionAssetType(); if (type == LLAssetType::AT_NONE) + { //no accordion selected + + // when no accordion selected then selected item from flat list view + // has more priority than expanded when determining filtering + LLUUID selected_item_id = mWearableItemsList->getSelectedUUID(); + LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id); + if(item) { + showFilteredWearablesListView(item->getWearableType()); + return; + } + + // when no accordion selected and no selected items in flat list view + // determine filtering according to expanded accordion type = mCOFWearables->getExpandedAccordionAssetType(); } @@ -830,7 +853,7 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) applyListViewFilter(LVIT_BODYPART); break; case LLAssetType::AT_CLOTHING: - default: + default: applyListViewFilter(LVIT_CLOTHING); break; } |