[NUI] Fix wrong AnimationState after VectorAnimatedImageView playing stoped
authorDongsug Song <dongsug.song@samsung.com>
Wed, 2 Dec 2020 02:46:38 +0000 (11:46 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 2 Dec 2020 07:39:09 +0000 (16:39 +0900)
src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs

index a0efb42..6f2c1f3 100755 (executable)
@@ -232,8 +232,21 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public AnimationStates AnimationState
         {
-            private set;
-            get;
+            private set
+            {
+                CurrentAnimationState = value;
+            }
+            get
+            {
+                if (CurrentAnimationState == AnimationStates.Playing)
+                {
+                    if (PlayState == PlayStateType.Stopped)
+                    {
+                        CurrentAnimationState = AnimationStates.Stopped;
+                    }
+                }
+                return CurrentAnimationState;
+            }
         }
         #endregion Property
 
@@ -547,6 +560,7 @@ namespace Tizen.NUI.BaseComponents
         }
 
         private string tag = "NUITEST";
+        private AnimationStates CurrentAnimationState = AnimationStates.Stopped;
         #endregion Private
     }
 }
\ No newline at end of file