#6071 Fix LLVisualParamHint's background image (FS:TJ- Cherry-pick to fix FIRE-36891)

master
Andrey Kleshchev 2026-08-05 15:33:44 +03:00 committed by Hecklezz
parent bc5af12717
commit 64e663c578
2 changed files with 16 additions and 0 deletions

View File

@ -93,6 +93,20 @@ LLVisualParamHint::LLVisualParamHint(
{
LLVisualParamHint::sInstances.insert( this );
mBackgroundp = LLUI::getUIImage("avatar_thumb_bkgrnd.png");
if (mBackgroundp)
{
LLViewerFetchedTexture* tex = dynamic_cast<LLViewerFetchedTexture*>(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

View File

@ -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;