[pitivi] Fix the handling of title clips in the timeline
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix the handling of title clips in the timeline
- Date: Wed, 24 Apr 2013 18:01:41 +0000 (UTC)
commit d25604b1e005e909576b14d69720b4e73209f352
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Wed Apr 17 00:44:21 2013 +0200
Fix the handling of title clips in the timeline
pitivi/timeline/timeline.py | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 230ed3f..f106765 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1127,14 +1127,20 @@ class Timeline(Gtk.VBox, Zoomable):
layer = self._ensureLayer()[0]
self.bTimeline.enable_update(False)
for asset in assets:
- if asset.is_image():
+ if isinstance(asset, GES.TitleClip):
+ clip_duration = asset.get_duration()
+ elif asset.is_image():
clip_duration = long(long(self._settings.imageClipLength) * Gst.SECOND / 1000)
else:
clip_duration = asset.get_duration()
print "added asset"
- layer.add_asset(asset, self.bTimeline.props.duration,
- 0, clip_duration, 1.0, asset.get_supported_formats())
+ if not isinstance(asset, GES.TitleClip):
+ layer.add_asset(asset, self.bTimeline.props.duration,
+ 0, clip_duration, 1.0, asset.get_supported_formats())
+ else:
+ asset.set_start(self.bTimeline.props.duration)
+ layer.add_clip(asset)
self.bTimeline.enable_update(True)
def setProjectManager(self, projectmanager):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]