[pitivi] timeline: Clarify __getDroppedLayer is called at most one time



commit 4a4fe1770f7ec2557606130a6abe90ddbad821ed
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Oct 2 14:42:00 2015 +0200

    timeline: Clarify __getDroppedLayer is called at most one time
    
    Summary: Depends on D286
    
    Reviewers: thiblahute
    
    Reviewed By: thiblahute
    
    Subscribers: aleb
    
    Differential Revision: https://phabricator.freedesktop.org/D287

 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 fb3f751..8296a05 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -787,10 +787,11 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
             if self.__last_clips_on_leave:
                 self.app.action_log.begin("add clip")
 
-                created_layer = None
+                if self.__on_separators:
+                    created_layer = self.__getDroppedLayer()
+                else:
+                    created_layer = None
                 for layer, clip in self.__last_clips_on_leave:
-                    if self.__on_separators and not created_layer:
-                        created_layer = self.__getDroppedLayer()
                     if created_layer:
                         layer = created_layer
                     layer.add_clip(clip)


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