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, 21 insertions, 6 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 053c2d9498..c397dd5092 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -331,6 +331,8 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL);
+ setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this));
+
mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list");
mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this));
@@ -405,10 +407,6 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key)
displayCurrentOutfit();
mInitialized = true;
}
-
- showAddWearablesPanel(false);
- mWearableItemsList->resetSelection();
- mInventoryItemsPanel->clearSelection();
}
void LLPanelOutfitEdit::moveWearable(bool closer_to_body)
@@ -578,6 +576,13 @@ void LLPanelOutfitEdit::onPlusBtnClicked(void)
LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id, true, true);
}
+void LLPanelOutfitEdit::onVisibilityChange()
+{
+ showAddWearablesPanel(false);
+ mWearableItemsList->resetSelection();
+ mInventoryItemsPanel->clearSelection();
+}
+
void LLPanelOutfitEdit::onAddWearableClicked(void)
{
LLPanelDummyClothingListItem* item = dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem());
@@ -726,12 +731,19 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
bool more_than_one_selected = ids.size() > 1;
bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()));
- //expanded accordion tab determines filtering when no item is selected
+ //selected and expanded accordion tabs determine filtering when no item is selected
if (nothing_selected)
{
showWearablesListView();
- switch (mCOFWearables->getExpandedAccordionAssetType())
+ //selected accordion tab is more priority than expanded tab when determining filtering
+ LLAssetType::EType type = mCOFWearables->getSelectedAccordionAssetType();
+ if (type == LLAssetType::AT_NONE)
+ {
+ type = mCOFWearables->getExpandedAccordionAssetType();
+ }
+
+ switch (type)
{
case LLAssetType::AT_OBJECT:
applyListViewFilter(LVIT_ATTACHMENT);
@@ -926,6 +938,9 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type
showAddWearablesPanel(true);
showWearablesListView();
+ // Reset mWearableItemsList position to top. See EXT-8180.
+ mWearableItemsList->goToTop();
+
//e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE
applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type));
}