summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-04-26 19:07:39 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-04-26 19:07:39 +0300
commit8112cefa731031dc1d06b98b119e177ea7be6a25 (patch)
tree3af050205d1503282a91d8ccc809d862291024c4 /indra/newview
parent2445525cc573024f8eb64cabac1e6e3dc3362085 (diff)
SL-16026 FIXED Copying only one diffuse texture allows pasting this texture into other types of textures
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelface.cpp3
-rw-r--r--indra/newview/lltooldraganddrop.cpp6
-rw-r--r--indra/newview/lltooldraganddrop.h3
3 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index d50d42bf2f..7fe5b1dd3f 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -3217,7 +3217,8 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
te,
itemp_res,
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
- LLUUID::null);
+ LLUUID::null,
+ 0);
}
}
// not an inventory item or no complete items
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 50868d0fa5..f76a2f7f90 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1100,7 +1100,8 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
S32 hit_face,
LLInventoryItem* item,
LLToolDragAndDrop::ESource source,
- const LLUUID& src_id)
+ const LLUUID& src_id,
+ S32 tex_channel)
{
if (hit_face == -1) return;
if (!item)
@@ -1124,7 +1125,8 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
if (gFloaterTools->getVisible() && panel_face)
{
- switch (LLSelectMgr::getInstance()->getTextureChannel())
+ tex_channel = (tex_channel > -1) ? tex_channel : LLSelectMgr::getInstance()->getTextureChannel();
+ switch (tex_channel)
{
case 0:
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 24a712029c..4537d73332 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -244,7 +244,8 @@ public:
static void dropTextureOneFace(LLViewerObject* hit_obj, S32 hit_face,
LLInventoryItem* item,
ESource source,
- const LLUUID& src_id);
+ const LLUUID& src_id,
+ S32 tex_channel = -1);
static void dropTextureAllFaces(LLViewerObject* hit_obj,
LLInventoryItem* item,
ESource source,