Prevent circumventing @viewtexture RLVa restriction via texture preview tooltips

master
Ansariel 2024-11-15 17:02:26 +01:00
parent 2b0a40696d
commit 0fa7daffbd
1 changed files with 7 additions and 0 deletions

View File

@ -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;
// <FS:Ansariel> Texture tooltip RLVa fix
if (!RlvActions::canPreviewTextures())
return LLUICtrlFactory::create<LLToolTip>(p);
// </FS:Ansariel>
if (sdTooltip.has("thumbnail_id") && sdTooltip["thumbnail_id"].asUUID().notNull())
{
// go straight for thumbnail regardless of type