[pitivi: 13/16] Fix splitting objects, which was broken in
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 13/16] Fix splitting objects, which was broken in
- Date: Wed, 8 Jul 2009 14:38:01 +0000 (UTC)
commit 477d039fbb05f5aeb4a21582be8ce7d23d835623
Author: Alessandro Decina <alessandro d gmail com>
Date: Sat Jul 4 03:30:20 2009 +0200
Fix splitting objects, which was broken in
9122088baac0e760567c3c931c9ed6580c852a85.
pitivi/timeline/timeline.py | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index e90ea8f..16122b0 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -100,11 +100,13 @@ class TimelineObject(Signallable, Loggable):
self.link = None
self._selected = False
- def copy(self):
+ def copy(self, copy_track_objects=True):
cls = self.__class__
other = cls(self.factory)
- for track_object in self.track_objects:
- other.addTrackObject(track_object.copy())
+ other.track_objects = []
+ if copy_track_objects:
+ other.track_objects.extend(track_object.copy() for track_object in
+ self.track_objects)
return other
@@ -344,10 +346,7 @@ class TimelineObject(Signallable, Loggable):
if not self.track_objects:
raise TimelineError()
- other = self.copy()
- # ditch track objects. This is a bit weird, will be more clear when we
- # use other uses of TimelineObject.copy
- other.track_objects = []
+ other = self.copy(copy_track_objects=False)
for track_object in self.track_objects:
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]