← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 703: Fixed a bug with splitting / razor tool on an "image" clip. It was not correctly splitting the c...

 

------------------------------------------------------------
revno: 703
fixes bug: https://launchpad.net/bugs/1048447
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Sun 2012-09-09 21:31:55 -0500
message:
  Fixed a bug with splitting / razor tool on an "image" clip.  It was not correctly splitting the clip.
modified:
  openshot/classes/clip.py
  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/clip.py'
--- openshot/classes/clip.py	2012-09-10 01:52:06 +0000
+++ openshot/classes/clip.py	2012-09-10 02:31:55 +0000
@@ -1931,7 +1931,8 @@
 		parent.remove_child (child_num)
 
 		# Modify the 1st clip, and render it to the screen
-		self.end_time = (seconds_for_x - self.position_on_track) + self.start_time
+		first_length = seconds_for_x - self.position_on_track
+		self.end_time = self.start_time + first_length
 		self.RenderClip()
 
 		# calculate the 2nd clip properties

=== modified file 'openshot/classes/track.py'
--- openshot/classes/track.py	2012-09-09 19:58:31 +0000
+++ openshot/classes/track.py	2012-09-10 02:31:55 +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.file_object.file_type == "image":
+		if NewClip.file_object.file_type == "image" and end_time == 300.0:
 			from windows import preferences
 			NewClip.end_time = NewClip.start_time + float(preferences.Settings.general["imported_image_length"])#7.0