diff --git a/ges/ges-container.c b/ges/ges-container.c index f569fcee40..35543fa13a 100644 --- a/ges/ges-container.c +++ b/ges/ges-container.c @@ -567,6 +567,11 @@ _child_start_changed_cb (GESTimelineElement * child, case GES_CHILDREN_IGNORE_NOTIFIES: return; case GES_CHILDREN_UPDATE_ALL_VALUES: + { + gboolean was_setting_simple = + ELEMENT_FLAG_IS_SET (container, GES_TIMELINE_ELEMENT_SET_SIMPLE); + + ELEMENT_SET_FLAG (container, GES_TIMELINE_ELEMENT_SET_SIMPLE); _ges_container_sort_children (container); start = container->children ? _START (container->children->data) : _START (container); @@ -577,14 +582,17 @@ _child_start_changed_cb (GESTimelineElement * child, _DURATION (container) = _END (container) - start; _START (container) = start; - GST_DEBUG_OBJECT (container, "Child move made us move %" GES_FORMAT, - GES_ARGS (container)); + GST_INFO ("%" GES_FORMAT " child %" GES_FORMAT " move made us move", + GES_ARGS (container), GES_ARGS (container->children->data)); g_object_notify (G_OBJECT (container), "start"); g_object_notify (G_OBJECT (container), "duration"); } + if (!was_setting_simple) + ELEMENT_UNSET_FLAG (container, GES_TIMELINE_ELEMENT_SET_SIMPLE); /* Falltrough! */ + } case GES_CHILDREN_UPDATE_OFFSETS: map->start_offset = _START (container) - _START (child); break; diff --git a/tests/check/python/test_timeline.py b/tests/check/python/test_timeline.py index 22cee6418a..2ac941b367 100644 --- a/tests/check/python/test_timeline.py +++ b/tests/check/python/test_timeline.py @@ -610,6 +610,32 @@ class TestEditing(common.GESSimpleTimelineTest): self.assertEqual(group.props.start, 5) self.assertEqual(group.props.duration, 15) + group1 = GES.Group.new () + group1.add(group) + clips[0].trim(0) + self.assertTimelineTopology([ + [ # Unique layer + (GES.TestClip, 0, 10), + (GES.TestClip, 10, 10), + ] + ]) + self.assertEqual(group.props.start, 0) + self.assertEqual(group.props.duration, 20) + self.assertEqual(group1.props.start, 0) + self.assertEqual(group1.props.duration, 20) + + self.assertTrue(clips[1].edit([], -1, GES.EditMode.EDIT_TRIM, GES.Edge.EDGE_END, 15)) + self.assertTimelineTopology([ + [ # Unique layer + (GES.TestClip, 0, 10), + (GES.TestClip, 10, 5), + ] + ]) + self.assertEqual(group.props.start, 0) + self.assertEqual(group.props.duration, 15) + self.assertEqual(group1.props.start, 0) + self.assertEqual(group1.props.duration, 15) + def test_trim_end_past_max_duration(self): clip = self.append_clip() max_duration = clip.props.duration