summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-10-21 23:08:48 +0000
committerLoren Shih <seraph@lindenlab.com>2009-10-21 23:08:48 +0000
commit67c4555a3793850ca8a8142b1e3e72c90d5001f4 (patch)
tree4ba917e75afd155c7090ba9b5ed876bb8f9556cc /indra/newview/llinventorybridge.cpp
parent5cb23717816ca7420c6eb5471dbbd386438929cb (diff)
svn merge -r136533:136919 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/avatar-pipeline-14 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
* Bugs: EXT-1779
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 23f0c7c450..d876647692 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3818,12 +3818,14 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
else if ("detach" == action)
{
LLInventoryItem* item = gInventory.getItem(mUUID);
- if( item )
+ // In case we clicked on a link, detach the base object instead of the link.
+ LLInventoryItem* base_item = gInventory.getItem(item->getLinkedUUID());
+ if(base_item)
{
gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
gMessageSystem->nextBlockFast(_PREHASH_ObjectData );
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
- gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getUUID() );
+ gMessageSystem->addUUIDFast(_PREHASH_ItemID, base_item->getUUID() );
gMessageSystem->sendReliable( gAgent.getRegion()->getHost() );
}