From 0fa7daffbdfec5c664e4e8c950ad64313a0e778b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 15 Nov 2024 17:02:26 +0100 Subject: [PATCH] Prevent circumventing @viewtexture RLVa restriction via texture preview tooltips --- indra/newview/llinspecttexture.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp index e4a092c5b9..499aaa1a85 100644 --- a/indra/newview/llinspecttexture.cpp +++ b/indra/newview/llinspecttexture.cpp @@ -33,6 +33,8 @@ #include "lltrans.h" #include "llviewertexturelist.h" +#include "rlvactions.h" + // ============================================================================ // Helper functions @@ -42,6 +44,11 @@ LLToolTip* LLInspectTextureUtil::createInventoryToolTip(LLToolTip::Params p) { const LLSD& sdTooltip = p.create_params; + // Texture tooltip RLVa fix + if (!RlvActions::canPreviewTextures()) + return LLUICtrlFactory::create(p); + // + if (sdTooltip.has("thumbnail_id") && sdTooltip["thumbnail_id"].asUUID().notNull()) { // go straight for thumbnail regardless of type