diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-05-19 13:47:53 +0300 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-05-19 13:47:53 +0300 |
commit | 075b98a330e50c74b9801681ce8782f56f5e6f8f (patch) | |
tree | 2824d6e87ac2269d4773c3b08e000a97e88b2076 /indra | |
parent | 2c817f0b40aa22209b498e5e42dca8eab6439f4e (diff) | |
parent | cfd56572020cd693dc71e4b01cc7394e02256cba (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-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 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); } |