summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-11-26 19:22:31 +0200
committerandreykproductengine <akleshchev@productengine.com>2014-11-26 19:22:31 +0200
commit3ccb8d6a561c692da7a0001467c3192dd298c1fd (patch)
treef71962a1aa5bafd7bbba5b9e2e65c7c684909a97
parent35a8938892a16c17da8ef7707227f4494bb41eb5 (diff)
MAINT-1861 FIXED Texture doesn't appear in Inventory after using 'Copy to inventory' button
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp1
-rwxr-xr-xindra/newview/llpreview.cpp15
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;