diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-05-19 14:07:56 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-05-19 14:07:56 +0300 |
commit | 7f4680c8c22804e6506375e4cedd1daf7d721670 (patch) | |
tree | 68447bb65110a50aeaf47990c1102864057ccab7 | |
parent | 9aacdbc155b894532a85b18912288691ecb3832c (diff) | |
parent | 075b98a330e50c74b9801681ce8782f56f5e6f8f (diff) |
merge
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index c1623a4fa7..4178fd9c90 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -457,13 +457,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); } |