summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-09-01 17:36:00 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-09-01 17:36:00 -0700
commit05c8ef3f3c002e71805bb04e9eddc3280630fca1 (patch)
tree17408d8f3587e35b4e244a41e23499d6f2542112 /indra/newview/llpanelface.cpp
parenta44959c00a8ec4675d40dcd81e217f905f948735 (diff)
SL-20167: Grey out the clipboard when copying the material to clipboard is not allowed
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index b502fa3546..d86956e370 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1975,7 +1975,8 @@ void LLPanelFace::updateCopyTexButton()
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
mMenuClipboardTexture->setEnabled(objectp && objectp->getPCode() == LL_PCODE_VOLUME && objectp->permModify()
&& !objectp->isPermanentEnforced() && !objectp->isInventoryPending()
- && (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1));
+ && (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)
+ && LLMaterialEditor::canClipboardObjectsMaterial());
std::string tooltip = (objectp && objectp->isInventoryPending()) ? LLTrans::getString("LoadingContents") : getString("paste_options");
mMenuClipboardTexture->setToolTip(tooltip);
}
@@ -4147,7 +4148,8 @@ void LLPanelFace::onCopyTexture()
|| objectp->getPCode() != LL_PCODE_VOLUME
|| !objectp->permModify()
|| objectp->isPermanentEnforced()
- || selected_count > 1)
+ || selected_count > 1
+ || !LLMaterialEditor::canClipboardObjectsMaterial())
{
return;
}