From: Richard Huang Date: Mon, 7 Jul 2014 16:33:12 +0000 (+0100) Subject: Fixed the wrong scroll signal sequence in ItemView X-Git-Tag: dali_1.0.0~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=49f8dfaa037d9e36802f8be4f23e3c1bef90f6cb Fixed the wrong scroll signal sequence in ItemView [problem] The scroll signal sequence is wrong in ItemView. while scrolling ItemView by panning, ScrollCompleted signal is emitted before ScrollStarted signal. [cause] The touch down event always causes the ScrollCompleted signal to be emitted because it assumes the touch down event is to cancel the ongoing scrolling. But actually you need to touch down first in order to start the pan. [solution] Only emit the ScrollCompleted signal when there is an ongoing scroll animation. Change-Id: Ib641698b1b3771cfce53d54cec42423fb228ce17 Signed-off-by: Adeel Kazmi --- diff --git a/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index affea11..600a882 100644 --- a/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -1111,7 +1111,10 @@ bool ItemView::OnTouchEvent(const TouchEvent& event) mScrollOvershoot = 0.0f; AnimateScrollOvershoot(0.0f); - mScrollCompletedSignalV2.Emit(GetCurrentScrollPosition()); + if(mScrollAnimation) + { + mScrollCompletedSignalV2.Emit(GetCurrentScrollPosition()); + } RemoveAnimation(mScrollAnimation); } @@ -1521,6 +1524,7 @@ void ItemView::OnScrollFinished(Animation& source) void ItemView::OnLayoutActivationScrollFinished(Animation& source) { + RemoveAnimation(mScrollAnimation); mRefreshEnabled = true; DoRefresh(GetCurrentLayoutPosition(0), true); }