From 64e663c5782b59b5edecd0d0bba4ef4fa60cc2d4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 5 Aug 2026 15:33:44 +0300 Subject: [PATCH] #6071 Fix LLVisualParamHint's background image (FS:TJ- Cherry-pick to fix FIRE-36891) --- indra/newview/lltoolmorph.cpp | 15 +++++++++++++++ indra/newview/lltoolmorph.h | 1 + 2 files changed, 16 insertions(+) diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 966b00e151..d7aee2ccc7 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -93,6 +93,20 @@ LLVisualParamHint::LLVisualParamHint( { LLVisualParamHint::sInstances.insert( this ); mBackgroundp = LLUI::getUIImage("avatar_thumb_bkgrnd.png"); + if (mBackgroundp) + { + LLViewerFetchedTexture* tex = dynamic_cast(mBackgroundp->getImage().get()); + if (tex) + { + tex->setKnownDrawSize(width, height); + } + + mBackgroundLoadedConnection = mBackgroundp->addLoadedCallback([this]() + { + mNeedsUpdate = true; + mDelayFrames = 0; + }); + } llassert(width != 0); llassert(height != 0); @@ -104,6 +118,7 @@ LLVisualParamHint::LLVisualParamHint( LLVisualParamHint::~LLVisualParamHint() { LLVisualParamHint::sInstances.erase( this ); + mBackgroundLoadedConnection.disconnect(); } //virtual diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index fb62ba9bba..9f4b5f6fe9 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -95,6 +95,7 @@ protected: LLJoint* mCamTargetJoint; // joint to target with preview camera LLUIImagePtr mBackgroundp; + boost::signals2::scoped_connection mBackgroundLoadedConnection; typedef std::set< LLVisualParamHint* > instance_list_t; static instance_list_t sInstances;