[pitivi] timeline: Fix timeline commit execution when dragging clips to the timeline



commit 489b03b1e8aa85b0460580a0e82d819228a903e4
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Jul 6 20:54:33 2015 +0200

    timeline: Fix timeline commit execution when dragging clips to the timeline
    
    We need to commit the timeline when we remove clips on drag-leave
    and we need to properly finish the context when after a drag leave there
    is a drag-drop signal
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752020

 pitivi/timeline/timeline.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index c8cdd5c..37871a8 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -747,6 +747,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
                 self.selection.setSelection([], SELECT)
                 for clip in clips:
                     clip.get_layer().remove_clip(clip)
+                self._project.pipeline.commit_timeline()
 
             self.draggingElement = None
             self.__got_dragged = False
@@ -772,7 +773,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
                 if zoom_was_fitted:
                     self.parent._setBestZoomRatio()
 
-                self.dragEnd()
+                self.dragEnd(True)
         elif target == EFFECT_TARGET_ENTRY.target:
             self.fixme("TODO Implement effect support")
         else:
@@ -1028,8 +1029,8 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
 
         return self.bTimeline.get_layers()[priority]
 
-    def dragEnd(self):
-        if self.draggingElement is not None and self.__got_dragged:
+    def dragEnd(self, force=False):
+        if (self.draggingElement is not None and self.__got_dragged) or force:
             self.debug("DONE dragging %s" % self.draggingElement)
             self._snapEndedCb()
 


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