From 97846d698c68b171afc67533274442cc295753d0 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 6 Dec 2011 14:11:21 -0300 Subject: [PATCH] ges: Remove transitions properly --- ges/ges-timeline-layer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ges/ges-timeline-layer.c b/ges/ges-timeline-layer.c index cb4fa1b46c..7a4f19e532 100644 --- a/ges/ges-timeline-layer.c +++ b/ges/ges-timeline-layer.c @@ -36,6 +36,9 @@ #define LAYER_HEIGHT 10 +static void +track_object_removed_cb (GESTimelineObject * object, + GESTrackObject * track_object, GESTimelineLayer * layer); static void track_object_added_cb (GESTimelineObject * object, GESTrackObject * track_object, GESTimelineLayer * layer); static void track_object_changed_cb (GESTrackObject * track_object, @@ -312,6 +315,8 @@ ges_timeline_layer_add_object (GESTimelineLayer * layer, if (GES_IS_TIMELINE_SOURCE (object)) { g_signal_connect (G_OBJECT (object), "track-object-added", G_CALLBACK (track_object_added_cb), layer); + g_signal_connect (G_OBJECT (object), "track-object-removed", + G_CALLBACK (track_object_removed_cb), layer); } } @@ -372,13 +377,12 @@ static void track_object_removed_cb (GESTimelineObject * object, GESTrackObject * track_object, GESTimelineLayer * layer) { + if (GES_IS_TRACK_SOURCE (track_object)) { g_signal_handlers_disconnect_by_func (track_object, track_object_changed_cb, object); calculate_transitions (track_object, layer); } - - g_object_unref (layer); return; }