From: Jinho, Lee Date: Mon, 30 Oct 2017 05:58:19 +0000 (+0900) Subject: [4.0] Text auto scroll animation bug fix X-Git-Tag: submit/tizen_4.0/20171106.091104~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=616f014cfb3de9a071c5ae510ca441d1dfcfc3f2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [4.0] 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 --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 7b7bc0df91..73540ecf97 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -621,6 +621,12 @@ int UtcDaliToolkitTextlabelScrollingP(void) try { // 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(); diff --git a/dali-toolkit/internal/text/text-scroller.cpp b/dali-toolkit/internal/text/text-scroller.cpp index 466bfa687d..f8089a2bc3 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