pitivi r1376 - in trunk/pitivi: timeline ui



Author: edwardrv
Date: Fri Nov 28 17:04:22 2008
New Revision: 1376
URL: http://svn.gnome.org/viewvc/pitivi?rev=1376&view=rev

Log:
fix issues with deadband not being set after changing project

Modified:
   trunk/pitivi/timeline/timeline.py
   trunk/pitivi/ui/complextimeline.py

Modified: trunk/pitivi/timeline/timeline.py
==============================================================================
--- trunk/pitivi/timeline/timeline.py	(original)
+++ trunk/pitivi/timeline/timeline.py	Fri Nov 28 17:04:22 2008
@@ -80,6 +80,7 @@
         self.videocomp.gnlobject.connect("pad-removed", self._removedVideoPadCb)
 
         # we need to keep track of every object added to the timeline
+        self.__instances = []
         self.videocomp.connect("source-added", self._sourceAddedCb)
         self.videocomp.connect("source-removed", self._sourceRemovedCb)
 
@@ -148,7 +149,7 @@
 ## nearest edit point. We do this here so we can keep track of edit points
 ## for all layers/tracks.
 
-    __instances = []
+    __instances = None
     __deadband = 0
     __do_updates = True
     __edges = None
@@ -160,6 +161,7 @@
     def _sourceRemovedCb(self, composition, inst):
         assert inst in self.__instances
         self.__instances.remove(inst)
+        self.updateEdges()
 
     def setDeadband(self, db):
         self.__deadband = db
@@ -186,6 +188,8 @@
             # TODO: filtering mechanism
         self.__edges = edges.keys()
         self.__edges.sort()
+        print self.__edges
+        print self.__deadband
 
     def snapTimeToEdge(self, time):
         """Returns the input time or the nearest edge"""

Modified: trunk/pitivi/ui/complextimeline.py
==============================================================================
--- trunk/pitivi/ui/complextimeline.py	(original)
+++ trunk/pitivi/ui/complextimeline.py	Fri Nov 28 17:04:22 2008
@@ -669,6 +669,8 @@
         # project signals
         instance.PiTiVi.connect("new-project-loading",
             self._newProjectLoadingCb)
+        instance.PiTiVi.connect("new-project-loaded",
+            self._newProjectLoadedCb)
         instance.PiTiVi.connect("new-project-failed",
             self._newProjectFailedCb)
         self._createUI()
@@ -723,6 +725,10 @@
     def _newProjectLoadingCb(self, unused_inst, project):
         self.layerInfoList.setTimeline(project.timeline)
 
+    def _newProjectLoadedCb(self, unused_inst, unused_project):
+        # force set deadband when new timeline loads
+        self.compositionLayers.zoomChanged()
+
     def _newProjectFailedCb(self, unused_inst, unused_reason, unused_uri):
         self.layerInfoList.setTimeline(None)
 



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