[pitivi: 18/20] timeline.py: fix ripple span calculation when there is nothign to ripple
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 18/20] timeline.py: fix ripple span calculation when there is nothign to ripple
- Date: Wed, 15 Jul 2009 06:38:24 +0000 (UTC)
commit 36ff4a4a11a81e9be5a7553b86f9df4925deafdc
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Tue Jul 14 18:52:11 2009 -0700
timeline.py: fix ripple span calculation when there is nothign to ripple
pitivi/timeline/timeline.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 5fc30a1..4724e39 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1076,8 +1076,12 @@ class MoveContext(EditingContext):
self.focus.priority, ripple)
# get the span over all clips for ripple editing
- self.ripple_span = (max((obj.start + obj.duration for obj in ripple)) -
- self.earliest)
+
+ latest = self.latest
+ for timeline_object in ripple:
+ latest = max(latest, timeline_object.start +
+ timeline_object.duration)
+ self.ripple_span = latest - self.earliest
# save default values
self.default_originals = self._saveValues(other)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]