[pitivi] ui: Set project DAR on Viewer when switching to the timeline.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] ui: Set project DAR on Viewer when switching to the timeline.
- Date: Tue, 12 May 2009 12:52:57 -0400 (EDT)
commit 2774c16bd0f4b1c0ff415d6ef8be88b8c098d054
Author: Edward Hervey <bilboed bilboed com>
Date: Tue May 12 18:39:13 2009 +0200
ui: Set project DAR on Viewer when switching to the timeline.
---
pitivi/ui/mainwindow.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 17d03de..6918d05 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -883,8 +883,12 @@ class PitiviMainWindow(gtk.Window, Loggable):
def _timelineRulerSeekCb(self, ruler, position):
self.debug("position:%s", gst.TIME_ARGS (position))
- self.viewer.setAction(self.project.view_action)
- self.viewer.setPipeline(self.project.pipeline)
+ if self.viewer.action != self.project.view_action:
+ self.viewer.setAction(self.project.view_action)
+ self.viewer.setPipeline(self.project.pipeline)
+ # get the pipeline settings and set the DAR of the viewer
+ sett = self.project.getSettings()
+ self.viewer.setDisplayAspectRatio(float(sett.videopar * sett.videowidth) / float(sett.videoheight))
# everything above only needs to be done if the viewer isn't already
# set to the pipeline.
self.project.pipeline.pause()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]