[pitivi] undo: Timeline should be commited after splitting



commit 49dcded84699cb0f7f8de6bd7cfc3557f2030c05
Author: Thibault Saunier <tsaunier igalia com>
Date:   Wed Mar 13 09:31:55 2019 -0300

    undo: Timeline should be commited after splitting
    
    And do not commit in ClipAction as the commiting needs to be handled at
    the action log level

 pitivi/timeline/timeline.py | 3 ++-
 pitivi/undo/timeline.py     | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 39e216d7..56727740 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1895,7 +1895,8 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
         If clips are selected, split them at the current playhead position.
         Otherwise, split all clips at the playhead position.
         """
-        with self.app.action_log.started("split clip", toplevel=True):
+        with self.app.action_log.started("split clip", toplevel=True,
+                    finalizing_action=CommitTimelineFinalizingAction(self._project.pipeline)):
             self._splitElements(self.timeline.selection.selected)
 
     def _splitElements(self, clips=None):
diff --git a/pitivi/undo/timeline.py b/pitivi/undo/timeline.py
index 68289e76..58ff29e2 100644
--- a/pitivi/undo/timeline.py
+++ b/pitivi/undo/timeline.py
@@ -300,11 +300,9 @@ class ClipAction(UndoableAction):
             assert(res)
         finally:
             self.clip.disconnect_by_func(child_added_cb)
-        timeline.get_asset().pipeline.commit_timeline()
 
     def remove(self):
         self.layer.remove_clip(self.clip)
-        self.layer.get_timeline().get_asset().pipeline.commit_timeline()
 
 
 class ClipAdded(ClipAction):


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