From: Richard Huang Date: Fri, 3 Jul 2015 12:59:02 +0000 (+0100) Subject: Fix ItemView scroll issue while handling ScrollPositionIntervalReachedSignal X-Git-Tag: dali_1.0.49~7^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=c78f376a45136ebe94d5e90ec1dfade1a2ac7dc0 Fix ItemView scroll issue while handling ScrollPositionIntervalReachedSignal Change-Id: I8b8d04fde2bf2471804020f1bd4e4006cc6c1112 --- diff --git a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp index 350ace5..d2b715f 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -434,7 +434,7 @@ void ScrollBar::OnPan( const PanGesture& gesture ) if(itemView) { // Disable automatic refresh in ItemView during fast scrolling - GetImpl(itemView).SetRefreshEnabled(true);//!mIsPanning); + GetImpl(itemView).SetRefreshEnabled(!mIsPanning); } } } diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 13ab888..c70b792 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -1628,7 +1628,10 @@ void ItemView::GetItemsRange(ItemRange& range) void ItemView::OnScrollPositionChanged( float position ) { // Cancel scroll animation to prevent any fighting of setting the scroll position property. - RemoveAnimation(mScrollAnimation); + if(!mRefreshEnabled) + { + RemoveAnimation(mScrollAnimation); + } // Refresh the cache immediately when the scroll position is changed. DoRefresh(position, false); // No need to cache extra items.