[Tizen] Emit ResourceReady if we call Reload even if it was ready visual. 76/306176/1 accepted/tizen/7.0/unified/20240219.160854
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 16 Feb 2024 11:25:09 +0000 (20:25 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 16 Feb 2024 11:25:09 +0000 (20:25 +0900)
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 <eunkiki.hong@samsung.com>
dali-toolkit/internal/visuals/image/image-visual.cpp

index 6b639dd10e843f1c359fb7ad9ef3284959a5dbab..9bccb6ab0dbb3b5304435231846a8669cdddcdf8 100644 (file)
@@ -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;
     }