[pitivi] titleeditor: Handle the case where we have effects on titles



commit b13a2c21cc6cbb5aee537478540b72a0938dc17e
Author: Thibault Saunier <tsaunier gnome org>
Date:   Thu Jul 16 10:08:11 2015 +0200

    titleeditor: Handle the case where we have effects on titles
    
    Summary: Depends on D261
    
    Reviewers: Mathieu_Du, aleb
    
    Differential Revision: https://phabricator.freedesktop.org/D262

 pitivi/titleeditor.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/titleeditor.py b/pitivi/titleeditor.py
index c3baa73..6df809f 100644
--- a/pitivi/titleeditor.py
+++ b/pitivi/titleeditor.py
@@ -382,8 +382,6 @@ class TitleEditor(Loggable):
         if len(self._drag_events) > 0 and event.get_state() & Gdk.ModifierType.BUTTON1_MASK:
             self._drag_updated = True
             self._drag_events.append((event.x, event.y))
-            st = self._drag_events[0]
-            e = self._drag_events[-1]
 
     def drag_release_event(self, unused_widget, unused_event):
         self._drag_events = []
@@ -398,7 +396,10 @@ class TitleEditor(Loggable):
         selected_clip = selection.getSingleClip(GES.TitleClip)
         source = None
         if selected_clip:
-            source = selected_clip.get_children(False)[0]
+            for child in selected_clip.get_children(False):
+                if isinstance(child, GES.TitleSource):
+                    source = child
+                    break
 
         if source:
             self.set_source(source)


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