From 539302cd7f46772ecd11654bda90943c31075437 Mon Sep 17 00:00:00 2001 From: Julien Heanley Date: Wed, 9 Apr 2014 14:54:08 +0100 Subject: [PATCH] (ScrollOvershoot) Removed OnStage checks now that issue has been fixed in PropertyNotification Change-Id: Ic334fb2c4d889604670a45b6a9d57dcbdc88f1ba --- .../scroll-overshoot-indicator-impl.cpp | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) 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); } } -- 2.7.4