[pitivi] timeline/elements: Don't overlap first and last keyframes.



commit f94db805439d50700a7ceec98213980f1b6ddf15
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date:   Fri Jul 5 03:34:21 2013 +0200

    timeline/elements: Don't overlap first and last keyframes.

 pitivi/timeline/elements.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index ef7e444..7ada1a1 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -823,7 +823,8 @@ class Keyframe(Clutter.Actor):
         newTs = self.tsStart + Zoomable.pixelToNs(delta_x)
         newValue = self.valueStart - (delta_y / EXPANDED_SIZE)
 
-        newTs = min(max(newTs, self.inpoint), self.duration)
+        # Don't overlap first and last keyframes.
+        newTs = min(max(newTs, self.inpoint + 1), self.duration - 1)
 
         newValue = min(max(newValue, 0.0), 1.0)
 


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