Reset Autoscrolling on TextLabel relayout
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-scroller.cpp
index d2f9348..172cc2f 100644 (file)
@@ -268,6 +268,13 @@ void TextScroller::SetParameters( Actor sourceActor, const Size& controlSize, co
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters controlSize[%f,%f] offscreenSize[%f,%f] direction[%d] alignmentOffset[%f]\n",
                  controlSize.x, controlSize.y, offScreenSize.x, offScreenSize.y, direction, alignmentOffset );
 
+  CleanUp(); //  If already scrolling then restart with new parameters
+
+  if ( mScrollAnimation )
+  {
+    mScrollAnimation.Clear();
+  }
+
   FrameBufferImage offscreenRenderTargetForText = FrameBufferImage::New( offScreenSize.width, offScreenSize.height, Pixel::RGBA8888 );
   Renderer renderer;