[pitivi] ui.timelineedges: handle case where not all track objects in a timelineobj have same start/end
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] ui.timelineedges: handle case where not all track objects in a timelineobj have same start/end
- Date: Fri, 10 Jul 2009 11:40:33 +0000 (UTC)
commit 2e3820b6aca69f7a894d0f9ac172c796ad93bb5e
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Tue Apr 21 12:35:54 2009 -0700
ui.timelineedges: handle case where not all track objects in a timelineobj have same start/end
pitivi/timeline/timeline.py | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 73c6f1e..c89ef94 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -663,8 +663,8 @@ class TimelineEdges(object):
@param timeline_object: The object whose start/stop we want to track.
@type timeline_object: L{TimelineObject}
"""
- self.addStartEnd(timeline_object.start,
- timeline_object.start + timeline_object.duration)
+ for obj in timeline_object.track_objects:
+ self.addTrackObject(obj)
def removeTimelineObject(self, timeline_object):
"""
@@ -674,8 +674,16 @@ class TimelineEdges(object):
to track.
@type timeline_object: L{TimelineObject}
"""
- self.removeStartEnd(timeline_object.start,
- timeline_object.start + timeline_object.duration)
+ for obj in timeline_object.track_objects:
+ self.removeTrackObject(obj)
+
+ def addTrackObject(self, track_object):
+ self.addStartEnd(track_object.start,
+ track_object.start + track_object.duration)
+
+ def removeTrackObject(self, track_object):
+ self.removeStartEnd(track_object.start,
+ track_object.start + track_object.duration)
def addStartEnd(self, start, end=None):
"""
@@ -697,7 +705,6 @@ class TimelineEdges(object):
index = bisect_right(self.edges, end, index)
if (len(self.edges) == 0) or (self.edges[index - 1] != end):
self.edges.insert(index, end)
- print self.edges, start, end
def removeStartEnd(self, start, end=None):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]