[pitivi] ui/clipproperties.py: fixe removeEffect weirdness



commit 18f8955c850d841f8d9298899f1462a1b563b0ac
Author: Thibault Saunier <tsaunier gnome org>
Date:   Wed Sep 1 14:53:14 2010 +0200

    ui/clipproperties.py: fixe removeEffect weirdness

 pitivi/ui/clipproperties.py |   21 +++++----------------
 1 files changed, 5 insertions(+), 16 deletions(-)
---
diff --git a/pitivi/ui/clipproperties.py b/pitivi/ui/clipproperties.py
index c3a2441..8bf576d 100644
--- a/pitivi/ui/clipproperties.py
+++ b/pitivi/ui/clipproperties.py
@@ -257,22 +257,11 @@ class EffectProperties(gtk.HBox):
             self._removeEffect(effect)
 
     def _removeEffect(self, effect):
-        rm = False
-        for timeline_object in self.timeline_objects:
-            if effect in timeline_object.track_objects:
-                self.app.action_log.begin("remove effect")
-                track  = effect.track
-                timeline_object.removeTrackObject(effect)
-                track.removeTrackObject(effect)
-                self.app.action_log.commit()
-                rm = True
-
-                self._cleanCache(effect)
-                break
-
-        if not rm:
-            raise ClipPropertiesError("Effect not in the selected list of\
-                                      TimelineObjects")
+        self.app.action_log.begin("remove effect")
+        effect.timeline_object.removeTrackObject(effect)
+        effect.track.removeTrackObject(effect)
+        self.app.action_log.commit()
+        self._cleanCache(effect)
 
     def _cleanCache(self, effect):
         element = effect.getElement()



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