[pitivi] undo: Disconnect from the signals correctly.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] undo: Disconnect from the signals correctly.
- Date: Sat, 15 Nov 2014 10:31:27 +0000 (UTC)
commit e82efbb5d54430a852de270c5ae7f104866ac2ef
Author: Mathieu Duponchelle <mathieu duponchelle opencreed com>
Date: Thu May 1 13:22:13 2014 +0200
undo: Disconnect from the signals correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=739251
pitivi/undo/timeline.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/undo/timeline.py b/pitivi/undo/timeline.py
index 9bb4ffc..6bb5a12 100644
--- a/pitivi/undo/timeline.py
+++ b/pitivi/undo/timeline.py
@@ -272,12 +272,12 @@ class TimelineLogObserver(object):
timeline.connect("layer-removed", self._layerRemovedCb)
def _disconnectFromTimeline(self, timeline):
- try:
- timeline.disconnect_by_func(self._clipAddedCb)
- timeline.disconnect_by_func(self._clipRemovedCb)
- except TypeError:
- # Was not connected to any layer yet
- pass
+ for layer in timeline.get_layers():
+ layer.disconnect_by_func(self._clipAddedCb)
+ layer.disconnect_by_func(self._clipRemovedCb)
+
+ timeline.disconnect_by_func(self._layerAddedCb)
+ timeline.disconnect_by_func(self._layerRemovedCb)
def _connectToClip(self, clip):
tracker = ClipPropertyChangeTracker()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]