(ScrollOvershoot) Removed OnStage checks now that issue has been fixed in PropertyNot...
authorJulien Heanley <j.heanley@partner.samsung.com>
Wed, 9 Apr 2014 13:54:08 +0000 (14:54 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 15 May 2014 11:52:22 +0000 (12:52 +0100)
Change-Id: Ic334fb2c4d889604670a45b6a9d57dcbdc88f1ba

base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp

index 4df873c..20f16d8 100644 (file)
@@ -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);
   }
 }