[pitivi: 6/9] Reset scrolling limits in the timeline when object



commit 2f12826f239c236cdbdc56a6be93fe37ba7a9317
Author: Alessandro Decina <alessandro decina collabora co uk>
Date:   Tue Mar 3 18:31:39 2009 +0100

    Reset scrolling limits in the timeline when objects are removed. Fixes #573892.
---
 pitivi/ui/timeline.py |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index c8a8c39..de8dd05 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -255,14 +255,10 @@ class Timeline(gtk.VBox, Loggable, Zoomable):
 
     timeline = receiver()
 
-    prev_duration = 0
-
     @handler(timeline, "duration-changed")
     def _timelineStartDurationChanged(self, unused_timeline, duration):
-        if duration > self.prev_duration:
-            self.prev_duration = duration
-            self.ruler.setMaxDuration(self.prev_duration)
-            self.__canvas.setMaxDuration(self.prev_duration)
+        self.ruler.setMaxDuration(duration)
+        self.__canvas.setMaxDuration(duration)
         self.ruler.setShadedDuration(duration)
 
 ## ToolBar callbacks



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