Reset mGestureStackDepth when panning is interrupted by ScrollTo 83/24183/1
authorjonghyun.ho <jonghyun.ho@samsung.com>
Mon, 23 Jun 2014 09:30:19 +0000 (18:30 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 17:47:36 +0000 (18:47 +0100)
[problem]     ScrollView is stopped and not snapped
[cause]       mGestureStackDepth is not zero so FinishTransform is not called
[solution]    Reset mGestureStackDepth when panning is interrupted by ScrollTo

Change-Id: I694cc769279c1e25039dbe0660eda542dfdd9a8e
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp

index 0c761fba27ffdeab32dc2276d28995e0252e070c..0d373991834565cde3a6d94cd11ea76531acb221 100644 (file)
@@ -1296,6 +1296,7 @@ void ScrollView::TransformTo(const Vector3& position, const Vector3& scale, floa
   {
     DALI_LOG_SCROLL_STATE("[0x%X] Interrupting Pan, set to false", this );
     mPanning = false;
+    mGestureStackDepth = 0;
     self.SetProperty( mPropertyPanning, false );
 
     if( mScrollMainInternalPrePositionConstraint )
@@ -2646,6 +2647,10 @@ void ScrollView::OnGestureEx(Gesture::State state)
     {
       FinishTransform();
     }
+    else
+    {
+      DALI_LOG_SCROLL_STATE("[0x%X] mGestureStackDepth[%d]", this, mGestureStackDepth);
+    }
   }
 }