scroll-actor: Fix ->transition not being reset
When the transition was removed from the scroll-actor manually, to cancel a not-finished animation, the transition struct member wasn't reset to NULL. This fixes this problem, and removes the need for the struct member to be reset manually when animation has completed. https://bugzilla.gnome.org/show_bug.cgi?id=676334
This commit is contained in:
parent
c9028cee48
commit
26c1d89d19
@ -397,13 +397,6 @@ clutter_scroll_actor_get_scroll_mode (ClutterScrollActor *actor)
|
||||
return actor->priv->scroll_mode;
|
||||
}
|
||||
|
||||
static void
|
||||
on_transition_completed (ClutterTimeline *timeline,
|
||||
ClutterScrollActor *actor)
|
||||
{
|
||||
actor->priv->transition = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_scroll_actor_scroll_to_point:
|
||||
* @actor: a #ClutterScrollActor
|
||||
@ -466,9 +459,7 @@ clutter_scroll_actor_scroll_to_point (ClutterScrollActor *actor,
|
||||
clutter_timeline_set_delay (CLUTTER_TIMELINE (priv->transition),
|
||||
info->cur_state->easing_delay);
|
||||
/* we need this to clear the priv->transition pointer */
|
||||
g_signal_connect (priv->transition, "completed",
|
||||
G_CALLBACK (on_transition_completed),
|
||||
actor);
|
||||
g_object_add_weak_pointer (G_OBJECT (priv->transition), (gpointer *) &priv->transition);
|
||||
|
||||
clutter_actor_add_transition (CLUTTER_ACTOR (actor),
|
||||
"scroll-to",
|
||||
|
Loading…
Reference in New Issue
Block a user