MAINT-1861 FIXED Texture doesn't appear in Inventory after using 'Copy to inventory' button

meow-7.2.2
andreykproductengine 2014-11-26 19:22:31 +02:00
parent cba3f14215
commit b828e6d5b6
2 changed files with 16 additions and 0 deletions

View File

@ -1010,6 +1010,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());
}
}

View File

@ -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"
@ -403,6 +404,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;