summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-05-19 13:46:03 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-05-19 13:46:03 +0300
commitcfd56572020cd693dc71e4b01cc7394e02256cba (patch)
tree8e6101f737793d65fe947b63f216c952a8b8af25
parenta4fc76a0f749e07d703ddb7ed923d7c4ea94ab7e (diff)
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
-rw-r--r--indra/newview/llpaneloutfitedit.cpp22
1 files changed, 17 insertions, 5 deletions
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);
}