[pitivi/ges] timeline: Ignore objects without URIs when purging



commit dec898e0c7f408de9727bfbf4b89299a63012db4
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Tue Apr 10 17:33:08 2012 -0400

    timeline: Ignore objects without URIs when purging

 pitivi/timeline/timeline.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index ec39e97..7ece7d9 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -953,8 +953,13 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         layers = self.timeline.get_layers()
         for layer in layers:
             for tlobj in layer.get_objects():
-                if uri == tlobj.get_uri():
-                    layer.remove_object(tlobj)
+                if hasattr(tlobj, "get_uri"):
+                    if tlobj.get_uri() == uri:
+                        layer.remove_object(tlobj)
+                else:
+                    # TimelineStandardTransition and the like don't have URIs
+                    # GES will remove those transitions automatically.
+                    self.debug("Not removing %s from timeline as it has no URI" % tlobj)
 
     def _create_temp_source(self, x, y):
         """



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]