[pitivi] interpolator: fix removeKeyframe



commit 534ae1bb6e21be3050f9754eb724a31684853c98
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Fri May 29 14:05:02 2009 -0700

    interpolator: fix removeKeyframe

 pitivi/timeline/track.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 5420025..d898a3b 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -171,7 +171,9 @@ class Interpolator(Signallable):
         if not value:
             value = self._default
         if not mode:
-            mode = self._control_source.get_interpolation_mode()
+            # FIXME: uncomment this when back-end support works
+            # mode = self._controller.get_interpolation_mode()
+            mode = gst.INTERPOLATE_LINEAR
 
         kf = Keyframe(self)
         self._keyframes.append(kf)
@@ -187,8 +189,9 @@ class Interpolator(Signallable):
     def removeKeyFrame(self, keyframe):
         # FIXME: uncomment this when back-end support works
         # self._controller.unset(keyframe.time)
-        self._keyframes.remove(kf)
-        self.emit("keyframe-removed", kf)
+        if keyframe is not self.start and keyframe is not self.end:
+            self._keyframes.remove(keyframe)
+            self.emit("keyframe-removed", keyframe)
 
     def setKeyframeMode(self, kf, mode):
         # FIXME: currently InterpolationSourceControllers only support a
@@ -198,7 +201,8 @@ class Interpolator(Signallable):
         # globally
         for keyframe in self.keyframes:
             keyframe.setObjectMode(mode)
-        self._controller.set_interpolation_mode(mode)
+        # FIXME: uncomment when backend works
+        # self._controller.set_interpolation_mode(mode)
 
     def setKeyframeTime(self, kf, time):
         time = max(self.start.time, min(self.end.time, time))



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