Remove some retard
This commit is contained in:
@@ -2408,22 +2408,8 @@ class VideoEditor:
|
|||||||
if not self.templates:
|
if not self.templates:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Find template with start_frame > current_frame
|
# Use the existing function to find the template to remove
|
||||||
current_frame = self.current_frame
|
template_to_remove = self.get_template_for_frame(self.current_frame)
|
||||||
template_to_remove = None
|
|
||||||
|
|
||||||
for i, (start_frame, region, template_image) in enumerate(self.templates):
|
|
||||||
if start_frame > current_frame:
|
|
||||||
# Found template with start_frame > current_frame
|
|
||||||
# Remove the previous one (if it exists)
|
|
||||||
if i > 0:
|
|
||||||
template_to_remove = i - 1
|
|
||||||
break
|
|
||||||
elif start_frame == current_frame:
|
|
||||||
# Found template with start_frame == current_frame
|
|
||||||
# Remove THIS template
|
|
||||||
template_to_remove = i
|
|
||||||
break
|
|
||||||
|
|
||||||
if template_to_remove is not None:
|
if template_to_remove is not None:
|
||||||
removed_template = self.templates.pop(template_to_remove)
|
removed_template = self.templates.pop(template_to_remove)
|
||||||
|
Reference in New Issue
Block a user