[pitivi] timeline: Finnish undo stack on drag-leave



commit c443fc885d753ffbf75fb99f91309af9e49b0a98
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Jul 6 22:17:25 2015 +0200

    timeline: Finnish undo stack on drag-leave
    
    Avoiding to let the undo stack into an inconsistent state

 pitivi/timeline/timeline.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index af0a2b7..083e58f 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -749,6 +749,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
                 for clip in clips:
                     clip.get_layer().remove_clip(clip)
                 self._project.pipeline.commit_timeline()
+                self.app.action_log.commit()
 
             self.draggingElement = None
             self.__got_dragged = False
@@ -762,6 +763,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
         target = self.drag_dest_find_target(context, None).name()
         if target == URI_TARGET_ENTRY.target:
             if self.__last_clips_on_leave:
+                self.app.action_log.begin("add clip")
                 self._createdClips = False
                 self.dropData = None
                 self.dropDataReady = False


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