[pitivi/ges: 65/287] clipproperties: Fix bugs in SelectionChangesCb



commit 2ab0cfef8d1e3a2ab17cdeb891c85798b2b795ae
Author: Thibault Saunier <thibault saunier collabora com>
Date:   Mon Oct 24 16:30:19 2011 +0200

    clipproperties: Fix bugs in SelectionChangesCb

 pitivi/ui/clipproperties.py |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/pitivi/ui/clipproperties.py b/pitivi/ui/clipproperties.py
index 604e9ae..a02f4e6 100644
--- a/pitivi/ui/clipproperties.py
+++ b/pitivi/ui/clipproperties.py
@@ -596,19 +596,13 @@ class TransformationProperties(gtk.Expander):
         effect.freeze_notify()
         return self.effect
 
-    def _selectionChangedCb(self, project, element):
-        self.timeline_objects = []
-        if isinstance(element, set):
-            for elem in element:
-                self.timeline_objects.append(elem)
-        else:
-            self.timeline_objects.append(element)
-        if len(self.timeline_objects) > 0:
-            for tl_obj in self.timeline_objects:
-                pass
+    def _selectionChangedCb(self, project, selection):
+        self.timeline_objects = list(selection)
 
-            if tl_obj.get_timeline_object() != self._current_tl_obj:
-                self._current_tl_obj = tl_obj.get_timeline_object()
+        if len(self.timeline_objects) == 1:
+            tl_obj = self.timeline_objects[0]
+            if tl_obj != self._current_tl_obj:
+                self._current_tl_obj = tl_obj
                 self.effect = None
 
             self.set_sensitive(True)



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