[pitivi: 8/11] timelinecanvas: add scroll offset to PlayheadController



commit 6ecfbcdc5aae69143040f6994033dc127e66071c
Author: Alessandro Decina <alessandro d gmail com>
Date:   Mon Oct 4 14:14:09 2010 +0200

    timelinecanvas: add scroll offset to PlayheadController

 pitivi/ui/timelinecanvas.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index 9a0b2c2..5f8a1ab 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -63,8 +63,9 @@ class PlayheadController(Controller, Zoomable):
         Controller.__init__(self, *args, **kwargs)
 
     def set_pos(self, item, pos):
-        self._canvas.app.current.seeker.seek(
-            Zoomable.pixelToNs(pos[0]))
+        x, y = pos
+        x += self._hadj.get_value()
+        self._canvas.app.current.seeker.seek(Zoomable.pixelToNs(x))
 
 class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
 



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