[pitivi/ges] timeline: Update the canvas' playhead position on zoom change



commit 40fffafd6549657a2ac6aa48432f2486235e36b8
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Thu Apr 26 22:30:35 2012 -0400

    timeline: Update the canvas' playhead position on zoom change

 pitivi/timeline/timeline.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 1e0dbb2..7ca643e 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1118,8 +1118,12 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         cur_playhead_offset = self._canvas._playhead.props.x - self.hadj.props.value
         new_pos = Zoomable.nsToPixel(self._position) - cur_playhead_offset
 
+        # Update the position of the playhead's line on the canvas
+        # This does not actually change the timeline position
+        self._canvas._playhead.props.x = Zoomable.nsToPixel(self._position)
+
         self.updateHScrollAdjustments()
-        self._scrollToPosition(new_pos)
+        self.scrollToPosition(new_pos)
         self.ruler.queue_resize()
         self.ruler.queue_draw()
 



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