[Tizen] Fix rarely finished callback not emitted 03/319903/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 19 Feb 2025 09:27:30 +0000 (18:27 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 19 Feb 2025 09:27:30 +0000 (18:27 +0900)
Change-Id: I2fed7eddc8e47786261ab96be5f1dfa63bb4dae6
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/event/animation/animation-impl.cpp

index 4e9dc88bd19d888b508aed1afb3e7dff93d0fbef..04b7fbf645d347cdb572c3fc5f26199bdbc0a102 100644 (file)
@@ -954,9 +954,6 @@ bool Animation::HasFinished()
 
   if(playedCount > mNotificationCount)
   {
-    // Note that only one signal is emitted, if the animation has been played repeatedly
-    mNotificationCount = playedCount;
-
     switch(mState)
     {
       case Internal::Animation::InternalState::PLAYING:
@@ -983,6 +980,12 @@ bool Animation::HasFinished()
         break;
       }
     }
+
+    if(hasFinished)
+    {
+      // Note that only one signal is emitted, if the animation has been played repeatedly
+      mNotificationCount = playedCount;
+    }
   }
 
   return hasFinished;