Text auto scroll animation bug fix 44/158144/2
authorJinho, Lee <jeano.lee@samsung.com>
Mon, 30 Oct 2017 05:58:19 +0000 (14:58 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Fri, 3 Nov 2017 04:14:12 +0000 (13:14 +0900)
 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
dali-toolkit/internal/text/text-scroller.cpp

index 31b147bcb5b7773c264d64a65c59b35552c4bc2b..659eb5420039ab9be5e8f91b3aa4d4d7d7535714 100644 (file)
@@ -628,6 +628,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();
index 466bfa687d296b29c3421c545e42c1727c11d6dd..f8089a2bc30e92b52ddef4bcbcd07c05efac1ddd 100644 (file)
@@ -233,6 +233,10 @@ void TextScroller::StopScrolling()
       }
     }
   }
+  else
+  {
+    mScrollerInterface.ScrollingFinished();
+  }
 }
 
 TextLabel::AutoScrollStopMode::Type TextScroller::GetStopMode() const