From b294b56a7689a60020e4a867527cc0cf9cd2d013 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 8 Mar 2019 12:28:31 -0300 Subject: [PATCH] clip: Emit signals while splitting in a way the operation is undoable Basically if we do not emit a "duration" change of the clip being splitted first when executing the 'reverse' operations would lead to fully overallaping clips. --- ges/ges-clip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ges/ges-clip.c b/ges/ges-clip.c index a1637cfc38..ff34483856 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -1376,6 +1376,9 @@ ges_clip_split (GESClip * clip, guint64 position) inpoint + old_duration * media_duration_factor); _set_duration0 (GES_TIMELINE_ELEMENT (new_object), new_duration); + _DURATION (clip) = old_duration; + g_object_notify (G_OBJECT (clip), "duration"); + /* We do not want the timeline to create again TrackElement-s */ ges_clip_set_moving_from_layer (new_object, TRUE); ges_layer_add_clip (clip->priv->layer, new_object); @@ -1409,6 +1412,7 @@ ges_clip_split (GESClip * clip, guint64 position) } ELEMENT_SET_FLAG (clip, GES_TIMELINE_ELEMENT_SET_SIMPLE); + _DURATION (clip) = duration; _set_duration0 (GES_TIMELINE_ELEMENT (clip), old_duration); ELEMENT_UNSET_FLAG (clip, GES_TIMELINE_ELEMENT_SET_SIMPLE);