[pitivi] curve.py: find focused keyframe during hover events, use this keyframe when dragging begins
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] curve.py: find focused keyframe during hover events, use this keyframe when dragging begins
- Date: Wed, 19 Aug 2009 09:30:12 +0000 (UTC)
commit abd9e2ecd3f17ed3a40cfb0c87fb8fdd5c11fdee
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Mon Aug 17 13:46:42 2009 -0700
curve.py: find focused keyframe during hover events, use this keyframe when dragging begins
pitivi/ui/curve.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index 4b60c1d..37ac7c2 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -57,11 +57,11 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
class Controller(Controller):
_cursor = HAND
+ _kf = None
def drag_start(self, item, target, event):
self._view.app.action_log.begin("volume change")
initial = self.from_item_event(item, event)
- self._kf = self._view.findKeyframe(initial)
if self._kf:
self._mousedown = self._view.keyframes[self._kf] - initial
if not self._kf:
@@ -72,7 +72,6 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
self.xyToTimeValue(initial)[0])
def drag_end(self, item, target, event):
- self._kf = None
self._view.app.action_log.commit()
def set_pos(self, obj, pos):
@@ -87,6 +86,11 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
- self.pos(self._view))
kf.value = value
+ def hover(self, item, target, event):
+ coords = self.from_item_event(item, event)
+ self._kf = self._view.findKeyframe(coords)
+ self._view.setFocusedKf(self._kf)
+
def double_click(self, pos):
interpolator = self._view.interpolator
kf = self._view.findKeyframe(pos)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]