scroll-actor: Check for point equality in the internal setter

The public API should just accept any valid value; it's up to the
internal setter to check if we're getting the same value as the one
currently set.
This commit is contained in:
Emmanuele Bassi 2012-05-18 18:00:30 +01:00
parent 26c1d89d19
commit 2c5af0c868

View File

@ -187,6 +187,9 @@ clutter_scroll_actor_set_scroll_to_internal (ClutterScrollActor *self,
ClutterScrollActorPrivate *priv = self->priv; ClutterScrollActorPrivate *priv = self->priv;
ClutterActor *actor = CLUTTER_ACTOR (self); ClutterActor *actor = CLUTTER_ACTOR (self);
if (clutter_point_equals (&priv->scroll_to, point))
return;
if (point == NULL) if (point == NULL)
clutter_point_init (&priv->scroll_to, 0.f, 0.f); clutter_point_init (&priv->scroll_to, 0.f, 0.f);
else else
@ -424,9 +427,6 @@ clutter_scroll_actor_scroll_to_point (ClutterScrollActor *actor,
priv = actor->priv; priv = actor->priv;
if (clutter_point_equals (&priv->scroll_to, point))
return;
info = _clutter_actor_get_animation_info (CLUTTER_ACTOR (actor)); info = _clutter_actor_get_animation_info (CLUTTER_ACTOR (actor));
/* jump to the end if there is no easing state, or if the easing /* jump to the end if there is no easing state, or if the easing