(ScrollView) Stop the touch down timer if Transform is called (via ScrollTo) while... 97/35697/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 23 Feb 2015 12:02:16 +0000 (12:02 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 23 Feb 2015 14:28:35 +0000 (06:28 -0800)
Patch from Matthew Stephenson

[Problem]  ScrollTo while timer is active causing undesired effects.
[Solution] Cancel the timer when TransformTo is called.

Change-Id: I6dd96454c0044054d929f30759f05c70e4877cd3

dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp

index 4f49d70..8bc5fe2 100644 (file)
@@ -1142,6 +1142,9 @@ void ScrollView::TransformTo(const Vector3& position,
 void ScrollView::TransformTo(const Vector3& position, float duration, AlphaFunction alpha,
                              DirectionBias horizontalBias, DirectionBias verticalBias)
 {
+  // If this is called while the timer is running, then cancel it
+  StopTouchDownTimer();
+
   Actor self( Self() );
 
   // Guard against destruction during signal emission