Fix issue, agif to play a number of times of loopcount. 05/229005/2
authorSeungho, Baek <sbsh.baek@samsung.com>
Fri, 27 Mar 2020 04:38:44 +0000 (13:38 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Fri, 27 Mar 2020 07:15:33 +0000 (16:15 +0900)
Change-Id: Ifc213ed03f3b5f1c0340d24e406781fcc2ce356f
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp
dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp

index 0e06386..082bbe0 100644 (file)
@@ -570,7 +570,7 @@ void TestLoopCount( ToolkitTestApplication &application, DummyControl &dummyCont
   tet_infoline( "Test that a timer has been created" );
   DALI_TEST_EQUALS( Test::GetTimerCount(), 1, TEST_INNER_LOCATION( location ) );
 
   tet_infoline( "Test that a timer has been created" );
   DALI_TEST_EQUALS( Test::GetTimerCount(), 1, TEST_INNER_LOCATION( location ) );
 
-  for ( uint16_t i = 0; i <= loopCount; i++ )
+  for ( uint16_t i = 0; i < loopCount; i++ )
   {
     for ( uint16_t j = 0; j < frameCount; j++ )
     {
   {
     for ( uint16_t j = 0; j < frameCount; j++ )
     {
index f2160ef..b1463ba 100755 (executable)
@@ -615,7 +615,7 @@ bool AnimatedImageVisual::DisplayNextFrame()
     // Wrap the frame index
     ++mCurrentFrameIndex;
 
     // Wrap the frame index
     ++mCurrentFrameIndex;
 
-    if( mLoopCount < 0 || mCurrentLoopIndex <= mLoopCount)
+    if( mLoopCount < 0 || mCurrentLoopIndex < mLoopCount)
     {
       mCurrentFrameIndex %= mFrameCount;
       if( mCurrentFrameIndex == 0 )
     {
       mCurrentFrameIndex %= mFrameCount;
       if( mCurrentFrameIndex == 0 )