SL-19134 Fix thumbnail ctrl not drawing an 'X' for empty texture

master
Andrey Kleshchev 2023-02-08 21:41:43 +02:00
parent e06c322971
commit 39a50b0fac
1 changed files with 12 additions and 9 deletions

View File

@ -164,16 +164,19 @@ void LLThumbnailCtrl::setValue(const LLSD& value)
if (tvalue.isUUID())
{
mImageAssetID = tvalue.asUUID();
// Should it support baked textures?
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
if (mImageAssetID.notNull())
{
// Should it support baked textures?
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
mTexturep->setBoostLevel(mPriority);
mTexturep->forceToSaveRawImage(0);
S32 desired_draw_width = mTexturep->getWidth();
S32 desired_draw_height = mTexturep->getHeight();
mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height);
mTexturep->setBoostLevel(mPriority);
mTexturep->forceToSaveRawImage(0);
S32 desired_draw_width = mTexturep->getWidth();
S32 desired_draw_height = mTexturep->getHeight();
mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height);
}
}
else if (tvalue.isString())
{