[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>
Tue, 15 Dec 2020 06:33:59 +0000 (15:33 +0900)
src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs

index ac90f4b8ef1e47ba8b70ac241ed4c62bebfb4d0b..0af7c9a9d3f9353af1f683572e73ea88556f6dc6 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