From 15db27e5f16067b87796438187ba7298cc8acc1e Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Fri, 27 Mar 2020 13:38:44 +0900 Subject: [PATCH] Fix issue, agif to play a number of times of loopcount. Change-Id: Ifc213ed03f3b5f1c0340d24e406781fcc2ce356f Signed-off-by: Seungho, Baek --- .../src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp | 2 +- .../internal/visuals/animated-image/animated-image-visual.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp index 0e06386af8..082bbe080d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp @@ -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 ) ); - for ( uint16_t i = 0; i <= loopCount; i++ ) + for ( uint16_t i = 0; i < loopCount; i++ ) { for ( uint16_t j = 0; j < frameCount; j++ ) { diff --git a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp index f2160ef669..b1463bad78 100755 --- a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp +++ b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp @@ -615,7 +615,7 @@ bool AnimatedImageVisual::DisplayNextFrame() // Wrap the frame index ++mCurrentFrameIndex; - if( mLoopCount < 0 || mCurrentLoopIndex <= mLoopCount) + if( mLoopCount < 0 || mCurrentLoopIndex < mLoopCount) { mCurrentFrameIndex %= mFrameCount; if( mCurrentFrameIndex == 0 ) -- 2.34.1