Remove some retard

This commit is contained in:
2025-09-26 19:39:59 +02:00
parent bfb9ed54d9
commit 16c841d14d

View File

@@ -2408,22 +2408,8 @@ class VideoEditor:
if not self.templates:
return False
# Find template with start_frame > current_frame
current_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
# Use the existing function to find the template to remove
template_to_remove = self.get_template_for_frame(self.current_frame)
if template_to_remove is not None:
removed_template = self.templates.pop(template_to_remove)