From 29c5bf19f706655605bd3588e0249dbd5fd52179 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 31 Mar 2023 21:18:50 +0300 Subject: SL-19379 WIP show fallback image with original size --- indra/newview/llinventorygallery.cpp | 2 +- indra/newview/llthumbnailctrl.cpp | 7 +++++++ indra/newview/llthumbnailctrl.h | 1 + .../newview/skins/default/xui/en/panel_inventory_gallery_item.xml | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 499d51c431..290688f179 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1081,7 +1081,7 @@ void LLInventoryGalleryItem::setThumbnail(LLUUID id) mDefaultImage = id.isNull(); if(mDefaultImage) { - getChild("preview_thumbnail")->setValue("Thumbnail_Fallback"); + getChild("preview_thumbnail")->clearTexture(); } else { diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp index 1b054b4c27..340dba3717 100644 --- a/indra/newview/llthumbnailctrl.cpp +++ b/indra/newview/llthumbnailctrl.cpp @@ -170,6 +170,13 @@ void LLThumbnailCtrl::draw() LLUICtrl::draw(); } +void LLThumbnailCtrl::clearTexture() +{ + mImageAssetID = LLUUID::null; + mTexturep = nullptr; + mImagep = nullptr; +} + // virtual // value might be a string or a UUID void LLThumbnailCtrl::setValue(const LLSD& value) diff --git a/indra/newview/llthumbnailctrl.h b/indra/newview/llthumbnailctrl.h index dc21046841..686603b373 100644 --- a/indra/newview/llthumbnailctrl.h +++ b/indra/newview/llthumbnailctrl.h @@ -66,6 +66,7 @@ public: virtual void draw() override; virtual void setValue(const LLSD& value ) override; + void clearTexture(); virtual BOOL handleHover(S32 x, S32 y, MASK mask) override; diff --git a/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml b/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml index 05a02158c0..b343aafca5 100644 --- a/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml +++ b/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml @@ -16,7 +16,7 @@ (worn)