openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00074
[Branch ~openshot.code/openshot/main] Rev 560: Applied a patch from Emil that doesn't reset the in/out points when using the replace clip functi...
------------------------------------------------------------
revno: 560
fixes bug(s): https://launchpad.net/bugs/841378
author: fincha
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Thu 2011-09-08 20:30:11 +0100
message:
Applied a patch from Emil that doesn't reset the in/out points when using the replace clip function, if the replacement clip is the same length as the original clip.
I also noticed that the clip thumbnail wasn't being updated with the new clip thumbnail, so I fixed that as well.
This patch also removes 2 redundant separator items from the right click menus.
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 2011-09-07 21:42:42 +0000
+++ openshot/windows/MainGTK.py 2011-09-08 19:30:11 +0000
@@ -3617,6 +3617,7 @@
if not f.file_type == "video":
self.mnuConvertPartToImageSequence.hide()
self.menuitem2.hide()
+ self.menuitem3.hide()
if ".svg" in self.selected_clip.name:
self.mnuClipEditTitle.show()
@@ -3873,8 +3874,10 @@
#this replaces the selected clip with a new clip
(filepath, filename) = os.path.split(new_clip)
file = self.project.project_folder.FindFile(filename)
+ # Only proceed if the file path is valid and isn't the same as the file that's being replaced
if file:
- # get original file length
+
+ # get original file properties
original_clip_length = selected_clip.length()
original_start_time = selected_clip.start_time
original_end_time = selected_clip.end_time
@@ -3883,8 +3886,11 @@
# swap the file object
selected_clip.file_object = file
selected_clip.name = filename
- selected_clip.start_time = 0.0 # reset IN to 0.0
- selected_clip.end_time = original_clip_length # reset OUT
+ selected_clip.thumb_location = selected_clip.file_object.thumb_location
+ # Only reset start and end time if the files have different durations
+ if file.length != original_file_length:
+ selected_clip.start_time = 0.0 # reset IN to 0.0
+ selected_clip.end_time = original_clip_length # reset OUT
# change the in / out points (if needed, due to length of new file)
if file.length < original_clip_length:
@@ -4234,8 +4240,9 @@
self.mnuTree.add(mnuRemoveFile)
# Separator
- mnuSeparator = gtk.SeparatorMenuItem()
- self.mnuTree.add(mnuSeparator)
+ if not is_folder_selected:
+ mnuSeparator = gtk.SeparatorMenuItem()
+ self.mnuTree.add(mnuSeparator)
# Add Upload to Web (if video is selected)
if is_video_selected: