#6071 Fix LLVisualParamHint's background image (FS:TJ- Cherry-pick to fix FIRE-36891)
parent
bc5af12717
commit
64e663c578
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue