← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 683: Using left & right keys you can step through the timeline 1 frame at a time. Have made a change s...

 

------------------------------------------------------------
revno: 683
fixes bug: https://launchpad.net/bugs/1010273
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Tue 2012-08-28 20:01:47 +0100
message:
  Using left & right keys you can step through the timeline 1 frame at a time. Have made a change so that when using the shift key & left or right it will step through by a second at a time. Based on a patch from pboivin which I modified slightly.
modified:
  openshot/windows/MainGTK.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/MainGTK.py'
--- openshot/windows/MainGTK.py	2012-05-22 20:04:06 +0000
+++ openshot/windows/MainGTK.py	2012-08-28 19:01:47 +0000
@@ -2000,8 +2000,12 @@
 			else:
 				self.lblVideoPreview.set_text(_("Video Preview (%sX)" % int(new_speed)))
 		else:
-			# STEP BACKWARDS 1 FRAME
-			self.MyVideo.seek(position - 1)
+			n_frames = 1
+			if self._SHIFT:
+				# step length is one second
+				n_frames = int(round(self.project.fps()))
+			# or just step 1 frame
+			self.MyVideo.seek(position - n_frames)
 			
 	
 	def on_tlbSeekForward_clicked(self, widget, single_frame=False, *args):
@@ -2035,8 +2039,12 @@
 			else:
 				self.lblVideoPreview.set_text(_("Video Preview (%sX)" % int(new_speed)))
 		else:
-			# STEP FORWARD 1 FRAME
-			self.MyVideo.seek(position + 1)
+			n_frames = 1
+			if self._SHIFT:
+				# step length is one second
+				n_frames = int(round(self.project.fps()))
+			# or just step 1 frame
+			self.MyVideo.seek(position + n_frames)
 			
 	
 	def on_tlbNextMarker_clicked(self, widget, *args):