summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2023-03-07 15:20:51 -0800
committerGitHub <noreply@github.com>2023-03-07 15:20:51 -0800
commit6ef8603bcd4028605b08913cc8b83c49d3b73de6 (patch)
tree51807dc637b6c929e9aac137da901a5acff74526 /indra/newview
parentab022db52ccf0596797fa67060433981b08f31d1 (diff)
parentac224dc8b41fa23e30c87a53ca121a55d99cee14 (diff)
Merge pull request #113 from secondlife/SL-19128
SL-19128: Fix adding material to face sometimes not respecting protections
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llselectmgr.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 55cf6795fe..22c1176b05 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1847,21 +1847,11 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
}
if (mItem)
{
- if (te == -1) // all faces
- {
- LLToolDragAndDrop::dropTextureAllFaces(objectp,
- mItem,
- LLToolDragAndDrop::SOURCE_AGENT,
- LLUUID::null);
- }
- else // one face
- {
- LLToolDragAndDrop::dropTextureOneFace(objectp,
- te,
- mItem,
- LLToolDragAndDrop::SOURCE_AGENT,
- LLUUID::null);
- }
+ LLToolDragAndDrop::dropTextureOneFace(objectp,
+ te,
+ mItem,
+ LLToolDragAndDrop::SOURCE_AGENT,
+ LLUUID::null);
}
else // not an inventory item
{
@@ -1938,6 +1928,12 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
LLUUID asset_id = mMatId;
if (mItem)
{
+ // If success, the material may be copied into the object's inventory
+ BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
+ if (!success)
+ {
+ return false;
+ }
asset_id = mItem->getAssetUUID();
}