From: Thibault Saunier Date: Sun, 1 Jul 2018 16:21:54 +0000 (-0400) Subject: group: Handle clips that get readded to a layer and inside a group X-Git-Tag: 1.19.3~493^2~703 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e5e26330667b3921fdaede62977547fdcaa050e;p=platform%2Fupstream%2Fgstreamer.git group: Handle clips that get readded to a layer and inside a group --- diff --git a/ges/ges-group.c b/ges/ges-group.c index 471c7ce..16dcaae 100644 --- a/ges/ges-group.c +++ b/ges/ges-group.c @@ -188,13 +188,14 @@ _child_clip_changed_layer_cb (GESTimelineElement * clip, return; } - if (new_layer && (layer_prio + offset < 0 || + if (new_layer && old_layer && (layer_prio + offset < 0 || (GES_TIMELINE_ELEMENT_TIMELINE (group) && layer_prio + offset + GES_CONTAINER_HEIGHT (group) - 1 > g_list_length (GES_TIMELINE_ELEMENT_TIMELINE (group)->layers)))) { - GST_INFO_OBJECT (container, "Trying to move to a layer outside of" - "the timeline layers, moving back to old layer (prio %i)", + GST_INFO_OBJECT (container, + "Trying to move to a layer %" GST_PTR_FORMAT " outside of" + "the timeline layers, moving back to old layer (prio %i)", new_layer, _PRIORITY (group) - offset); container->children_control_mode = GES_CHILDREN_INIBIT_SIGNAL_EMISSION; @@ -204,7 +205,7 @@ _child_clip_changed_layer_cb (GESTimelineElement * clip, return; } - if (!new_layer) { + if (!new_layer || !old_layer) { _update_our_values (group); return;