[pitivi] titleeditor: Do not flush pipeline when setting default values



commit 9f8d3789760ee31fe13e3fd280f6a0781774845c
Author: Thibault Saunier <tsaunier gnome org>
Date:   Tue Dec 9 17:30:08 2014 +0100

    titleeditor: Do not flush pipeline when setting default values
    
    Otherwize we might be flushing the pipeline before it even prerolled

 pitivi/titleeditor.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/titleeditor.py b/pitivi/titleeditor.py
index ec54901..ac6117a 100644
--- a/pitivi/titleeditor.py
+++ b/pitivi/titleeditor.py
@@ -61,6 +61,7 @@ class TitleEditor(Loggable):
         self._drag_events = []
         self._signals_connected = False
         self._setting_props = False
+        self._setting_initial_props = False
         self._children_props_handler = None
 
         self._createUI()
@@ -246,15 +247,21 @@ class TitleEditor(Loggable):
         clip = GES.TitleClip()
         clip.set_text("")
         clip.set_duration(int(Gst.SECOND * 5))
+
         # TODO: insert on the current layer at the playhead position.
         # If no space is available, create a new layer to insert to on top.
         self.app.gui.timeline_ui.insertEnd([clip])
         self.app.gui.timeline_ui.timeline.selection.setToObj(clip, SELECT)
 
+        self._setting_initial_props = True
         clip.set_color(FOREGROUND_DEFAULT_COLOR)
         clip.set_background(BACKGROUND_DEFAULT_COLOR)
+        self._setting_initial_props = False
 
     def _propertyChangedCb(self, source, unused_gstelement, pspec):
+        if self._setting_initial_props:
+            return
+
         if self._setting_props:
             self.seeker.flush()
             return


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