[pitivi: 14/18] mainwindow.py: set zoom ratio when adding the first clips to the timeline
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi: 14/18] mainwindow.py: set zoom ratio when adding the first clips to the timeline
- Date: Wed, 9 Dec 2009 11:04:33 +0000 (UTC)
commit 24ccab553243e50a0b53e668cb5978a774b72d59
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Thu Oct 29 18:27:05 2009 -0700
mainwindow.py: set zoom ratio when adding the first clips to the timeline
closes bug 595362
pitivi/ui/mainwindow.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 41b60bf..6d18eb0 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -177,6 +177,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
self._setActions(instance)
self._createUi(instance)
self.app = instance
+ self._zoom_duration_changed = False
self.app.projectManager.connect("new-project-loading",
self._projectManagerNewProjectLoadingCb)
@@ -689,6 +690,8 @@ class PitiviMainWindow(gtk.Window, Loggable):
if project.timeline.duration != 0:
self._setBestZoomRatio()
+ else:
+ self._zoom_duration_changed = True
def _setBestZoomRatio(self):
ruler_width = self.timeline.ruler.get_allocation()[2]
@@ -946,6 +949,9 @@ class PitiviMainWindow(gtk.Window, Loggable):
def _timelineDurationChangedCb(self, timeline, duration):
if duration > 0:
sensitive = True
+ if self._zoom_duration_changed:
+ self._setBestZoomRatio()
+ self._zoom_duration_changed = False
else:
sensitive = False
self.render_button.set_sensitive(sensitive)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]