From: Julien Heanley Date: Wed, 9 Apr 2014 13:54:08 +0000 (+0100) Subject: (ScrollOvershoot) Removed OnStage checks now that issue has been fixed in PropertyNot... X-Git-Tag: dali-2014-wk20-release~11 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=539302cd7f46772ecd11654bda90943c31075437 (ScrollOvershoot) Removed OnStage checks now that issue has been fixed in PropertyNotification Change-Id: Ic334fb2c4d889604670a45b6a9d57dcbdc88f1ba --- diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp index 4df873c..20f16d8 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp @@ -429,21 +429,19 @@ void ScrollOvershootEffectRipple::SetPropertyNotifications(Actor& scrollable) int overshootXPropertyIndex = scrollable.GetPropertyIndex(Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME); int overshootYPropertyIndex = scrollable.GetPropertyIndex(Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME); mCanScrollPropertyIndex = scrollable.GetPropertyIndex(IsVertical() ? Scrollable::SCROLLABLE_CAN_SCROLL_VERTICAL : Scrollable::SCROLLABLE_CAN_SCROLL_HORIZONTAL); - if(scrollable.OnStage()) + + if(!mOvershootNegativeNotification) { - if(!mOvershootNegativeNotification) - { - mOvershootNegativeNotification = scrollable.AddPropertyNotification(IsVertical() ? overshootYPropertyIndex : overshootXPropertyIndex, LessThanCondition(-Math::MACHINE_EPSILON_1)); - mOvershootNegativeNotification.SetNotifyMode(PropertyNotification::NotifyOnChanged); - mOvershootNegativeNotification.NotifySignal().Connect(this, &ScrollOvershootEffectRipple::OnNegativeOvershootNotification); - } + mOvershootNegativeNotification = scrollable.AddPropertyNotification(IsVertical() ? overshootYPropertyIndex : overshootXPropertyIndex, LessThanCondition(-Math::MACHINE_EPSILON_1)); + mOvershootNegativeNotification.SetNotifyMode(PropertyNotification::NotifyOnChanged); + mOvershootNegativeNotification.NotifySignal().Connect(this, &ScrollOvershootEffectRipple::OnNegativeOvershootNotification); + } - if(!mOvershootPositiveNotification) - { - mOvershootPositiveNotification = scrollable.AddPropertyNotification(IsVertical() ? overshootYPropertyIndex : overshootXPropertyIndex, GreaterThanCondition(Math::MACHINE_EPSILON_1)); - mOvershootPositiveNotification.SetNotifyMode(PropertyNotification::NotifyOnChanged); - mOvershootPositiveNotification.NotifySignal().Connect(this, &ScrollOvershootEffectRipple::OnPositiveOvershootNotification); - } + if(!mOvershootPositiveNotification) + { + mOvershootPositiveNotification = scrollable.AddPropertyNotification(IsVertical() ? overshootYPropertyIndex : overshootXPropertyIndex, GreaterThanCondition(Math::MACHINE_EPSILON_1)); + mOvershootPositiveNotification.SetNotifyMode(PropertyNotification::NotifyOnChanged); + mOvershootPositiveNotification.NotifySignal().Connect(this, &ScrollOvershootEffectRipple::OnPositiveOvershootNotification); } }