From 15c65f3ac01b5aaafe02bb34b7fc43b75190750d Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Mon, 30 Oct 2017 14:58:19 +0900 Subject: [PATCH] Text auto scroll animation bug fix Before this patch, That code played scroll animation. textLabel = TextLabel::New( "Hello World" ); textLabel.SetProperty( Toolkit::TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE); textLabel.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,true); textLabel.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,false); stage.Add(textLabel); So I added code for stopping animation when mScrollAnimation was Null. Change-Id: I4fa881215c4c30228e2cb0fb6f9f80e7060bf6b2 --- automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp | 6 ++++++ dali-toolkit/internal/text/text-scroller.cpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 31b147b..659eb54 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -630,6 +630,12 @@ int UtcDaliToolkitTextlabelScrollingP(void) // Render some text with the shared atlas backend labelImmediate.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); labelFinished.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); + + labelImmediate.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, false ); + labelFinished.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, false ); + + labelImmediate.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); + labelFinished.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); application.SendNotification(); application.Render(); diff --git a/dali-toolkit/internal/text/text-scroller.cpp b/dali-toolkit/internal/text/text-scroller.cpp index 466bfa6..f8089a2 100644 --- a/dali-toolkit/internal/text/text-scroller.cpp +++ b/dali-toolkit/internal/text/text-scroller.cpp @@ -233,6 +233,10 @@ void TextScroller::StopScrolling() } } } + else + { + mScrollerInterface.ScrollingFinished(); + } } TextLabel::AutoScrollStopMode::Type TextScroller::GetStopMode() const -- 2.7.4