[pitivi] ui/timeline: adding scrollToPlayhead() when moving between frames out of the view bounds
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui/timeline: adding scrollToPlayhead() when moving between frames out of the view bounds
- Date: Wed, 22 Sep 2010 15:03:51 +0000 (UTC)
commit 169586f7401b0d7079de05925119406e12c32238
Author: Luis de Bethencourt <luis debethencourt com>
Date: Wed Sep 22 16:04:19 2010 +0200
ui/timeline: adding scrollToPlayhead() when moving between frames out of the view bounds
pitivi/ui/timeline.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 85356e9..53a7e7a 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -560,8 +560,9 @@ class Timeline(gtk.Table, Loggable, Zoomable):
def scrollToPlayhead(self):
"""
- Scroll the current position as close to the center of the view
- as possible (as close as the timeline canvas allows).
+ If the current position is out of the view bouds, then scroll
+ as close to the center of the view as possible or as close as the
+ timeline canvas allows.
"""
page_size = self.hadj.get_page_size()
@@ -753,10 +754,12 @@ class Timeline(gtk.Table, Loggable, Zoomable):
prev_kf = self.timeline.getPrevKeyframe(timeline_position)
if prev_kf != None:
self._seeker.seek(prev_kf)
+ self.scrollToPlayhead()
def nextframe(self, action):
timeline_position = self._position
next_kf = self.timeline.getNextKeyframe(timeline_position)
if next_kf:
- self._seeker.seek(next_kf)
+ self._seeker.seek(next_kf)
+ self.scrollToPlayhead()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]