From c34f9c28b08a3dba50b831cde9a884f831366bee Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 19 Feb 2020 17:15:20 +0200 Subject: SL-12473 FIXED Copied texture params get duplicated when pasting to objects that use different face counts. --- indra/newview/llpanelface.cpp | 8 ++++++-- indra/newview/llpanelface.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') 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 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()); } diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 76673c6444..770f10e2ee 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -255,6 +255,8 @@ private: BOOL mPasteMapping; BOOL mPasteMedia; + BOOL mPopulateAllTEs; + // Update visibility of controls to match current UI mode // (e.g. materials vs media editing) // -- cgit v1.2.3