[pitivi] timeline/timeline.py: allow overlaps for single-clip move operation



commit 9500a28bfb36c183dcbd4de86dc1b14e3ecd34a6
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Sat Mar 6 01:44:30 2010 -0800

    timeline/timeline.py: allow overlaps for single-clip move operation

 pitivi/timeline/timeline.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index b9bd4d8..e7c7d30 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1139,6 +1139,18 @@ class MoveContext(EditingContext):
         self._restoreValues(self.default_originals)
 
     def finish(self):
+
+        # special case to allow creating transitions
+        if len(self.timeline_objects) == 1:
+            # run the update algorithm and see if the arrangement remains
+            # valid. Return immediately if valid.
+            self.focus.track.updateTransitions()
+            if self.focus.track.valid_arrangement:
+                self.focus.track._update_transitions = False
+                EditingContext.finish(self)
+                self.focus.track._update_transitions = True
+                return
+
         if isinstance(self.focus, TrackObject):
             focus_timeline_object = self.focus.timeline_object
         else:



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