diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2018-03-11 11:13:05 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2018-03-11 11:24:15 -0300 |
commit | eff9363d3c21e4b4740f9acce0fdc0db9a8ddd74 (patch) | |
tree | 66aa68dc0068d6a3c6f468b94352a0c5ddbed4b0 | |
parent | 211f3b5af100a9ff0370e6a8c7872ac93b9f22bd (diff) |
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
-rw-r--r-- | ges/ges-clip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ges/ges-clip.c b/ges/ges-clip.c index 539c1498ea..34ac6fabf3 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -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; |