[pitivi] curve.py: take in_point into account in xyToTimeValue



commit c4fa63bc752d4f8129158a0d278e66973dad0cdf
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Mon Jun 29 17:23:59 2009 -0700

    curve.py: take in_point into account in xyToTimeValue

 pitivi/ui/curve.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index 83ca153..4926d3a 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -89,7 +89,8 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
 
         def xyToTimeValue(self, pos):
             bounds = self._view.bounds
-            time = Zoomable.pixelToNs(pos[0] - bounds.x1)
+            time = (Zoomable.pixelToNs(pos[0] - bounds.x1) +
+                self._view.element.in_point)
             value = 1 - (pos[1] - bounds.y1) /  LAYER_HEIGHT_EXPANDED
             return time, value
 



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