From 370ddfb03e5df7d9207c77aec9237dfe192b65dc Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 24 Jun 2010 15:13:30 +0300 Subject: EXT-7963 FIXED Edit Outfit > Add More > Do not switch to next item type after add/replace - Added callback to wear item from Add More panel on doubleclick - To keep the list in its existing state and do not change the contents of the Add More panel to the next listed unworn item after the user wears an item, check if the item is not dummy. Dummy icons have no ids. Reviewed by Mike Antipov and Neal Orman at https://codereview.productengine.com/secondlife/r/647/ --HG-- branch : product-engine --- indra/newview/llcofwearables.cpp | 7 ++++++- indra/newview/llpaneloutfitedit.cpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 1926682a39..1fab5c7683 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -374,7 +374,12 @@ void LLCOFWearables::refresh() value_it_end = values.end(); value_it != value_it_end; ++value_it) { - list->selectItemByValue(*value_it); + // value_it may be null because of dummy items + // Dummy items have no ID + if(value_it->asUUID().notNull()) + { + list->selectItemByValue(*value_it); + } } } } diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 54776ca2f7..014b940e00 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -387,6 +387,7 @@ BOOL LLPanelOutfitEdit::postBuild() mWearableItemsList = getChild("list_view"); mWearableItemsList->setCommitOnSelectionChange(true); mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); + mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this)); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; -- cgit v1.2.3