From 1c9bffa8df7fb24a4545d02359ad1caa46416e3c Mon Sep 17 00:00:00 2001 From: "jonghyun.ho" Date: Wed, 23 Apr 2014 16:48:36 +0900 Subject: [PATCH 1/1] Cancelled signal is triggered to reset status when gesture is detached. [Issue#] N/A [Problem] In next case, application can't get ScrollCompleted signal. 1. Panning scroll view is started. 2. Call SetScrollSensitive(false) to stop movement of scroll view and pick the object inside. 3. Scroll view doesn't trigger Scrollcompleted signal until SetScrollSensitive(true) is called. [Cause] Scroll view is still thinking it's still being animated even though it's stopped and its sensitive is false. [Solution] Cancelled signal is triggered to reset status when gesture is detached. Change-Id: I7a03bd335072593bdad528be498f5f1acbfb9c1f Signed-off-by: David Steele --- .../controls/scrollable/scroll-view/scroll-view-impl.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index 16b54ae..395a3cb 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -923,15 +923,18 @@ void ScrollView::SetScrollSensitive(bool sensitive) } else if((mSensitive) && (!sensitive)) { - mSensitive = sensitive; + // while the scroll view is panning, the state needs to be reset. + bool isPanning = self.GetProperty( mPropertyPanning ); + if ( isPanning ) + { + PanGesture cancelGesture( Gesture::Cancelled ); + OnPan( cancelGesture ); + } + panGesture.Detach(self); + mSensitive = sensitive; mGestureStackDepth = 0; - self.SetProperty(mPropertyPanning, false); - - // Remove X & Y position constraints as they are not required when we are not panning. - self.RemoveConstraint(mScrollMainInternalXConstraint); - self.RemoveConstraint(mScrollMainInternalYConstraint); } } -- 2.7.4