[pitivi] timeline: Fix transition deselection



commit dcf96b46cf7a2a815efe1081d2d74c0c260a19d1
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Thu Oct 29 23:57:18 2015 +0100

    timeline: Fix transition deselection
    
    Once a transition was selected, it was not possible to click on the
    timeline in a free area to clear the selection.
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D537

 pitivi/timeline/timeline.py |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 0de0bfd..bf5254e 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -697,19 +697,11 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
         self.resetSelectionGroup()
         if self.__marquee.props.width_request > 0:
             clips = self.__marquee.findSelected()
-
-            if clips:
-                for clip in clips:
-                    self.current_group.add(clip.get_toplevel_parent())
-
-                self.selection.setSelection(clips, SELECT)
-            else:
-                self.selection.setSelection([], SELECT)
+            for clip in clips:
+                self.current_group.add(clip.get_toplevel_parent())
         else:
-            only_transitions = not bool([selected for selected in self.selection.selected
-                                         if not isinstance(selected, GES.TransitionClip)])
-            if not only_transitions:
-                self.selection.setSelection([], SELECT)
+            clips = []
+        self.selection.setSelection(clips, SELECT)
 
         self.__marquee.hide()
 


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