[Tizen](Vector) Stop the animation when the actor is off-stage or invisible
authorJoogab Yun <joogab.yun@samsung.com>
Fri, 27 Dec 2019 08:45:42 +0000 (17:45 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Fri, 27 Dec 2019 08:45:46 +0000 (17:45 +0900)
This reverts commit c3253649f11657a53f9aafdc781c6456b56bcd67.

Change-Id: I95e643091bcb53b778f151058210c08c68faffbd

dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h

index d4de346..2ed0502 100644 (file)
@@ -307,7 +307,7 @@ void AnimatedVectorImageVisual::DoSetOnStage( Actor& actor )
 
 void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
 {
-  PauseAnimation();
+  StopAnimation();
 
   if( mImpl->mRenderer )
   {
@@ -535,13 +535,13 @@ void AnimatedVectorImageVisual::SetVectorImageSize()
   }
 }
 
-void AnimatedVectorImageVisual::PauseAnimation()
+void AnimatedVectorImageVisual::StopAnimation()
 {
-  if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+  if( mActionStatus != DevelAnimatedVectorImageVisual::Action::STOP )
   {
-    mVectorAnimationTask->PauseAnimation();
+    mVectorAnimationTask->StopAnimation();
 
-    mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+    mActionStatus = DevelAnimatedVectorImageVisual::Action::STOP;
 
     if( mImpl->mRenderer )
     {
@@ -584,7 +584,7 @@ void AnimatedVectorImageVisual::OnControlVisibilityChanged( Actor actor, bool vi
 {
   if( !visible )
   {
-    PauseAnimation();
+    StopAnimation();
 
     DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this );
   }
@@ -594,7 +594,7 @@ void AnimatedVectorImageVisual::OnWindowVisibilityChanged( Window window, bool v
 {
   if( !visible )
   {
-    PauseAnimation();
+    StopAnimation();
 
     DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this );
   }
index 0ff2cdd..8aaed9c 100644 (file)
@@ -168,9 +168,9 @@ private:
   void SetVectorImageSize();
 
   /**
-   * @brief Pause the animation.
+   * @brief Stop the animation.
    */
-  void PauseAnimation();
+  void StopAnimation();
 
   /**
    * @brief Callback when the world scale factor changes.