summaryrefslogtreecommitdiff
path: root/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreview.cpp')
-rwxr-xr-xindra/newview/llpreview.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index cab7eff0dc..bf2652cb49 100755
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -39,6 +39,7 @@
#include "llradiogroup.h"
#include "llassetstorage.h"
#include "llviewerassettype.h"
+#include "llviewermessage.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "lldbstrings.h"
@@ -369,6 +370,20 @@ void LLPreview::onBtnCopyToInv(void* userdata)
self->mNotecardInventoryID,
item);
}
+ else if (self->mObjectUUID.notNull())
+ {
+ // item is in in-world inventory
+ LLViewerObject* object = gObjectList.findObject(self->mObjectUUID);
+ LLPermissions perm(item->getPermissions());
+ if(object
+ &&(perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
+ && perm.allowTransferTo(gAgent.getID())))
+ {
+ // copy to default folder
+ set_dad_inventory_item(item, LLUUID::null);
+ object->moveInventory(LLUUID::null, item->getUUID());
+ }
+ }
else
{
LLPointer<LLInventoryCallback> cb = NULL;