← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 676: Use the file type to check if a clip is an image when adding to the timeline, rather than length.

 

------------------------------------------------------------
revno: 676
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Wed 2012-05-23 20:41:04 +0100
message:
  Use the file type to check if a clip is an image when adding to the timeline, rather than length.
modified:
  openshot/classes/track.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/classes/track.py'
--- openshot/classes/track.py	2012-01-09 13:38:31 +0000
+++ openshot/classes/track.py	2012-05-23 19:41:04 +0000
@@ -58,7 +58,7 @@
 
 		# Adjust default length of images (all images default to 300 seconds.. i.e. 5 minutes)
 		# But since nobody wants an image to default to 5 minutes long, we adjust it to the default image length.
-		if NewClip.length() == 300.0:
+		if NewClip.file_object.file_type == "image":
 			from windows import preferences
 			NewClip.end_time = NewClip.start_time + float(preferences.Settings.general["imported_image_length"])#7.0