[pitivi] undo: Don't push LayerAdded when the layer already exists



commit accfc7fcb6a8870ee9708f250d0348436e0cada3
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Sep 4 02:43:48 2016 +0200

    undo: Don't push LayerAdded when the layer already exists
    
    Differential Revision: https://phabricator.freedesktop.org/D1298

 pitivi/undo/timeline.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/undo/timeline.py b/pitivi/undo/timeline.py
index 6864eb6..747789b 100644
--- a/pitivi/undo/timeline.py
+++ b/pitivi/undo/timeline.py
@@ -790,11 +790,11 @@ class TimelineObserver(Loggable):
         # simplifies the logic.
 
     def __layer_added_cb(self, ges_timeline, ges_layer):
+        action = LayerAdded(self.ges_timeline, ges_layer)
+        self.action_log.push(action)
         self._connect_to_layer(ges_layer)
 
     def _connect_to_layer(self, ges_layer):
-        action = LayerAdded(self.ges_timeline, ges_layer)
-        self.action_log.push(action)
         layer_observer = LayerObserver(ges_layer, self.action_log)
         self.layer_observers[ges_layer] = layer_observer
 


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