From cfd56572020cd693dc71e4b01cc7394e02256cba Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 19 May 2010 13:46:03 +0300 Subject: EXT-7234 FIXED whether folder view or list view is currently used is decided by their visibility deciding which list to use (folder/list view) depending on their conrainers visibility Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/405/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 44832ac496..4cf2288a85 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -446,13 +446,25 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) void LLPanelOutfitEdit::onAddToOutfitClicked(void) { - LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); - if (!curr_item) return; + LLUUID selected_id; + if (mInventoryItemsPanel->getVisible()) + { + LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); + if (!curr_item) return; + + LLFolderViewEventListener* listenerp = curr_item->getListener(); + if (!listenerp) return; + + selected_id = listenerp->getUUID(); + } + else if (mWearableItemsPanel->getVisible()) + { + selected_id = mWearableItemsList->getSelectedUUID(); + } - LLFolderViewEventListener* listenerp = curr_item->getListener(); - if (!listenerp) return; + if (selected_id.isNull()) return; - LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID()); + LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id); } -- cgit v1.2.3 From 9aacdbc155b894532a85b18912288691ecb3832c Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 19 May 2010 14:03:29 +0300 Subject: EXT-7242 FIXED Added a new "Edit my Shape" link to avatar self-click context menu and made it open the shape editing panel. Again, as in EXT-7241, I tried to improve the way the appearance panels (outfits / edit outfit / edit wearables) are switched, this time aiming to eliminate redundant time-consuming operations (fetches/updated/etc). I'm not particularly satisfied with the resulting code but it seems to work. A better solution might be to wrap the panels with LLSideTrayPanelContainer. Additional minor changes: - Fixed unsafe pointer cast in LLSidepanelAppearance::editWearable(). - Removed redundant onEditOutfitButtonClicked() and onEditWearBackClicked() methods from LLSidepanelAppearance. Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/395/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 44832ac496..c1623a4fa7 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -210,7 +210,8 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mCOFWearables(NULL), mInventoryItemsPanel(NULL), mCOFObserver(NULL), - mCOFDragAndDropObserver(NULL) + mCOFDragAndDropObserver(NULL), + mInitialized(false) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -307,6 +308,16 @@ BOOL LLPanelOutfitEdit::postBuild() return TRUE; } +// virtual +void LLPanelOutfitEdit::onOpen(const LLSD& key) +{ + if (!mInitialized) + { + displayCurrentOutfit(); + mInitialized = true; + } +} + void LLPanelOutfitEdit::moveWearable(bool closer_to_body) { LLUUID item_id = mCOFWearables->getSelectedUUID(); -- cgit v1.2.3