summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-08-05 15:33:44 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-08-05 21:07:24 +0300
commit0af5e55312bfc907cd3ab0a0711d3197f7527f14 (patch)
tree52336305d0197df5d624077c265bd5378f80387d
parent0d11c7ff40396906a3438a562cdc694afdda572b (diff)
#6071 Fix LLVisualParamHint's background image
-rw-r--r--indra/newview/lltoolmorph.cpp15
-rw-r--r--indra/newview/lltoolmorph.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index d2b32f8e23..1f3115ef29 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<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
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;