From e3a33b068dca4cf12a35da8785d2a7c90b621728 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Wed, 4 Aug 2010 11:38:29 +0300 Subject: EXT-8284 FIXED ('Add More' panel items aren't sorted by clothing type after it was opened by 'Replace' item of context menu) Restored from BAD MERGE at 5b5cc4a8642d Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/750/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 8b9baef54a..c12f1fbe99 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -609,11 +609,11 @@ void LLPanelOutfitEdit::onAddWearableClicked(void) } } -void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id) +void LLPanelOutfitEdit::onReplaceMenuItemClicked(LLUUID selected_item_id) { LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id); - if (item && item->getType() == LLAssetType::AT_BODYPART) + if (item) { showFilteredWearablesListView(item->getWearableType()); } -- cgit v1.2.3 From e6d5cc3bd1d678eaad7869a70b75d92772db3fc7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Aug 2010 17:21:33 -0400 Subject: EXT-8283 FIX, EXT-8360 FIX - original fixes got broken, presumably during some merge --- indra/newview/llpaneloutfitedit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index c12f1fbe99..07a66eaf10 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -1100,7 +1100,11 @@ void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list) void LLPanelOutfitEdit::onCOFChanged() { //the panel is only updated when is visible to a user - if (!isInVisibleChain()) return; + + // BAP - this check has to be removed because otherwise item name + // changes made when the panel is not visible will not be + // propagated to the panel. + // if (!isInVisibleChain()) return; update(); } -- cgit v1.2.3 From 07f668fe2b135f96b74e0999d052b4608e223b68 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 5 Aug 2010 13:31:19 +0100 Subject: fix a merge conflict I forgot to commit earlier. --- indra/newview/llpaneloutfitedit.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 0e9b3516ea..8b88a848cf 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -1321,7 +1321,15 @@ void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list) void LLPanelOutfitEdit::onCOFChanged() { + //the panel is only updated when is visible to a user + + // BAP - this check has to be removed because otherwise item name + // changes made when the panel is not visible will not be + // propagated to the panel. + // if (!isInVisibleChain()) return; + update(); +} void LLPanelOutfitEdit::updateWearablesPanelVerbButtons() { @@ -1347,11 +1355,6 @@ void LLPanelOutfitEdit::saveListSelection() if(!selected_ids.size()) return; - // BAP - this check has to be removed because otherwise item name - // changes made when the panel is not visible will not be - // propagated to the panel. - // if (!isInVisibleChain()) return; - for (std::set::const_iterator item_id = selected_ids.begin(); item_id != selected_ids.end(); ++item_id) { mWearableItemsList->selectItemByUUID(*item_id, true); -- cgit v1.2.3 From c187fdcf1fbac21cb7292d6269023eae83cb6847 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 6 Aug 2010 19:41:23 +0300 Subject: 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 --- indra/newview/llpaneloutfitedit.cpp | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') 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(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; } -- cgit v1.2.3