clip: Snapping should happen with one and only one TrackElement

This was leading to clip with TrackElements that were not at the
same position in their container, and weird bugs, see:

    https://gitlab.gnome.org/GNOME/pitivi/issues/2133
This commit is contained in:
Thibault Saunier 2018-03-11 11:13:05 -03:00
parent 211f3b5af1
commit eff9363d3c

View file

@ -152,10 +152,12 @@ _set_start (GESTimelineElement * element, GstClockTime start)
if (child != container->initiated_move) {
/* Make the snapping happen if in a timeline */
timeline = GES_TIMELINE_ELEMENT_TIMELINE (child);
if (timeline == NULL || ges_timeline_move_object_simple (timeline, child,
NULL, GES_EDGE_NONE, start) == FALSE)
_set_start0 (GES_TIMELINE_ELEMENT (child), start);
if (timeline && !container->initiated_move) {
if (ges_timeline_move_object_simple (timeline, child, NULL, GES_EDGE_NONE, start))
continue;
}
_set_start0 (GES_TIMELINE_ELEMENT (child), start);
}
}
container->children_control_mode = GES_CHILDREN_UPDATE;