summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-01 22:31:46 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-01 22:32:07 +0300
commit5048b3878c027859dcc9005dff550f0afc38f623 (patch)
tree1b45021acf5fccbd3218407f299630a9dd32ba1d /indra
parent87c337047dbfcdf11a04b2395b0165db24238823 (diff)
SL-20101 Fix ThumbnailDimentionsLimit poping up on success
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterchangeitemthumbnail.cpp34
1 files changed, 24 insertions, 10 deletions
diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp
index d7fbf1384b..692ef3b163 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.cpp
+++ b/indra/newview/llfloaterchangeitemthumbnail.cpp
@@ -546,12 +546,21 @@ struct ImageLoadedData
LLUUID mThumbnailId;
LLUUID mObjectId;
LLHandle<LLFloater> mFloaterHandle;
+ bool mSilent;
};
void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id, bool silent)
{
LLPointer<LLViewerFetchedTexture> texturep = LLViewerTextureManager::getFetchedTexture(asset_id);
- if (texturep->getFullWidth() == 0 && !texturep->isFullyLoaded() && !texturep->isMissingAsset())
+ if (texturep->isMissingAsset())
+ {
+ LL_WARNS() << "Attempted to assign missing asset " << asset_id << LL_ENDL;
+ if (!silent)
+ {
+ LLNotificationsUtil::add("ThumbnailDimentionsLimit");
+ }
+ }
+ else if (texturep->getFullWidth() == 0)
{
if (silent)
{
@@ -566,9 +575,10 @@ void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id
data->mObjectId = mItemId;
data->mThumbnailId = asset_id;
data->mFloaterHandle = getHandle();
+ data->mSilent = silent;
texturep->setLoadedCallback(onImageLoaded,
- MAX_DISCARD_LEVEL, // don't actually need max one, 3 or 4 should be enough
+ MAX_DISCARD_LEVEL, // Don't need full image, just size data
FALSE,
FALSE,
(void*)data,
@@ -648,16 +658,20 @@ void LLFloaterChangeItemThumbnail::onImageLoaded(
{
setThumbnailId(data->mThumbnailId, data->mObjectId);
}
+ else if (!data->mSilent)
+ {
+ // Should this only appear if floater is alive?
+ LLNotificationsUtil::add("ThumbnailDimentionsLimit");
+ }
+ }
- // Update floater
- if (!data->mFloaterHandle.isDead())
+ // Update floater
+ if (!data->mSilent && !data->mFloaterHandle.isDead())
+ {
+ LLFloaterChangeItemThumbnail* self = static_cast<LLFloaterChangeItemThumbnail*>(data->mFloaterHandle.get());
+ if (self && self->mExpectingAssetId == data->mThumbnailId)
{
- LLFloaterChangeItemThumbnail* self = static_cast<LLFloaterChangeItemThumbnail*>(data->mFloaterHandle.get());
- if (self && self->mExpectingAssetId == data->mThumbnailId)
- {
- LLNotificationsUtil::add("ThumbnailDimentionsLimit");
- self->mExpectingAssetId = LLUUID::null;
- }
+ self->mExpectingAssetId = LLUUID::null;
}
}