[pitivi] previewer: Handle the case where sources are added with inpoint != 0



commit 6350900fc0969361c0099af2f8029aa466f9caa9
Author: Thibault Saunier <tsaunier gnome org>
Date:   Tue Nov 4 20:24:25 2014 +0100

    previewer: Handle the case where sources are added with inpoint != 0
    
    That happens only when clip are splitted right but it was completely
    breaking thumbnail display.

 pitivi/timeline/previewers.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index 4f1ff2a..40ccd0e 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -302,6 +302,10 @@ class VideoPreviewer(Clutter.ScrollActor, PreviewGenerator, Zoomable, Loggable):
 
         self._checkCPU()
 
+        if self.bElement.props.in_point != 0:
+            position = Clutter.Point()
+            position.x = Zoomable.nsToPixel(self.bElement.props.in_point)
+            self.scroll_to_point(position)
         self._addVisibleThumbnails()
         # Save periodically to avoid the common situation where the user exits
         # the app before a long clip has been fully thumbnailed.


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