diff options
-rwxr-xr-x | indra/newview/llpanelobjectinventory.cpp | 1 | ||||
-rwxr-xr-x | indra/newview/llpreview.cpp | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 1f16505f71..db944827cd 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -909,6 +909,7 @@ void LLTaskTextureBridge::openItem() LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); if(preview) { + preview->setAuxItem(findItem()); preview->setObjectID(mPanel->getTaskUUID()); } } 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; |