summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2020-02-19 17:15:20 +0200
committermaxim_productengine <mnikolenko@productengine.com>2020-02-19 17:15:20 +0200
commitc34f9c28b08a3dba50b831cde9a884f831366bee (patch)
treef74312603c38e0d48a1cce72e68d9f79c12007be /indra/newview/llpanelface.cpp
parentec3d63cbf8d64d935f5660d8ae5a0f856627964c (diff)
SL-12473 FIXED Copied texture params get duplicated when pasting to objects that use different face counts.
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index f8199090dc..810c18de40 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -63,6 +63,8 @@
#include "lltexturectrl.h"
#include "lltextureentry.h"
#include "lltooldraganddrop.h"
+#include "lltoolface.h"
+#include "lltoolmgr.h"
#include "lltrans.h"
#include "llui.h"
#include "llviewercontrol.h"
@@ -332,7 +334,8 @@ LLPanelFace::LLPanelFace()
mPasteNormal(TRUE),
mPasteSpecular(TRUE),
mPasteMapping(TRUE),
- mPasteMedia(TRUE)
+ mPasteMedia(TRUE),
+ mPopulateAllTEs(TRUE)
{
USE_TEXTURE = LLTrans::getString("use_texture");
@@ -2904,6 +2907,7 @@ void LLPanelFace::onCopyFaces()
std::map<LLUUID, LLUUID> asset_item_map;
S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces());
+ mPopulateAllTEs = (num_tes != 1) || (LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool());
for (S32 te = 0; te < num_tes; ++te)
{
if (node->isTESelected(te))
@@ -3048,7 +3052,7 @@ void LLPanelFace::onCopyFaces()
void LLPanelFace::pasteFace(LLViewerObject* objectp, S32 te)
{
LLSD te_data;
- if (mClipboard.size() == 1)
+ if ((mClipboard.size() == 1) && mPopulateAllTEs)
{
te_data = *(mClipboard.beginArray());
}