← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 699: Added an upper limit to the size of fade and transition length when using the 'Add to Timeline' f...

 

------------------------------------------------------------
revno: 699
fixes bug: https://launchpad.net/bugs/792011
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Sun 2012-09-09 15:45:23 -0500
message:
  Added an upper limit to the size of fade and transition length when using the 'Add to Timeline' feature, to prevent invalid transitions and fades from being added to the timeline.
modified:
  openshot/windows/AddToTimeline.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/windows/AddToTimeline.py'
--- openshot/windows/AddToTimeline.py	2012-04-17 22:07:00 +0000
+++ openshot/windows/AddToTimeline.py	2012-09-09 20:45:23 +0000
@@ -52,9 +52,19 @@
 
 		# refresh tree
 		self.refresh()
+
+		# Get default length of images
+		imported_image_length = float(preferences.Settings.general["imported_image_length"])
+		max_transition_length = (imported_image_length / 2.0) - 0.1
+		
+		# Set the upper limits of the transitions & fade length
+		adjustment1 = gtk.Adjustment(value=2.0, lower=0.0, upper=max_transition_length, step_incr=0.5, page_incr=0.5, page_size=0.0)
+		self.txtTransitionLength.configure(adjustment1, 0.5, 2)
+		
+		adjustment2 = gtk.Adjustment(value=2.0, lower=0.0, upper=max_transition_length, step_incr=0.5, page_incr=0.5, page_size=0.0)
+		self.txtFadeLength.configure(adjustment2, 0.5, 2)
 		
 		# init all dropdowns
-		#self.init_animation()
 		self.init_fade()
 		self.init_tracks()
 		self.init_transitions()