[pitivi] Curve: add bounds to x, y coordinates before checking if they are in the path



commit 2d3a9db4340ba73fe3a22dce54f2d21bf0a8bfad
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Fri Jun 12 01:35:56 2009 +0200

    Curve: add bounds to x, y coordinates before checking if they are in the path

 pitivi/ui/curve.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index 59e7653..f71bb12 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -198,6 +198,8 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
     def do_simple_is_item_at(self, x, y, cr, pointer_event):
         if (between(0, x, self.nsToPixel(self.element.duration)) and
             between(0, y, self.height)):
+            x += self.bounds.x1
+            y += self.bounds.y1
             self.make_curve(cr)
             return cr.in_stroke(x, y) or bool(self.findKeyframe((x, y)))
         return False



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