From: Eunki, Hong Date: Fri, 16 Feb 2024 11:25:09 +0000 (+0900) Subject: [Tizen] Emit ResourceReady if we call Reload even if it was ready visual. X-Git-Tag: accepted/tizen/7.0/unified/20240219.160854^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3442f239e45a1283bb11f123c7d0c423537e12a0;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Emit ResourceReady if we call Reload even if it was ready visual. If the visual was already ready state, and if we call Reload, the visual state still ResourceReady. So ResourceReady signal was not be emitted. Since someone might need to know the timing of resource loaded after Reload(), Make we reset status as PREPARE, and wait callback again. Change-Id: Id0ddb6523c4d9fcd58aab63a2fb07d27fdd9c5b5 Signed-off-by: Eunki, Hong --- diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index 6b639dd..9bccb6a 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -864,6 +864,11 @@ void ImageVisual::OnDoAction(const Dali::Property::Index actionId, const Dali::P case DevelImageVisual::Action::RELOAD: { auto attemptAtlasing = AttemptAtlasing(); + + // Reset resource ready status when we call reload. + ResourceReady(Toolkit::Visual::ResourceStatus::PREPARING); + mLoadState = TextureManager::LoadState::NOT_STARTED; + LoadTexture(attemptAtlasing, mAtlasRect, mTextures, mOrientationCorrection, TextureManager::ReloadPolicy::FORCED); break; }