[pitivi] Fix removal of timeline edges when updates are disabled.



commit c585eee8319cb56588985ed5ea627cdc784b1510
Author: Alessandro Decina <alessandro d gmail com>
Date:   Mon Jul 13 16:25:12 2009 +0200

    Fix removal of timeline edges when updates are disabled.

 pitivi/timeline/timeline.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index eae3864..2aa5d71 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -719,14 +719,18 @@ class TimelineEdges(object):
 
     def removeTrackObject(self, track_object):
         try:
-            del self.by_object[track_object]
+            old_start, old_end = self.by_object[track_object]
         except KeyError:
             raise TimelineError()
 
-        self.changed_objects.pop(track_object, None)
+        try:
+            del self.changed_objects[track_object]
+            start = old_start
+            end = old_end
+        except KeyError:
+            start = track_object.start
+            end = track_object.start + track_object.duration
 
-        start = track_object.start
-        end = track_object.start + track_object.duration
         self.removeStartEnd(start, end)
 
         # remove start and end from self.by_start, self.by_end and self.by_time



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