From 769f0b7fd2dda5cdf0331a5f415c38ee329fd643 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 31 May 2020 16:23:19 +0200 Subject: [PATCH] stay at last tile --- pandora/sequence/extract.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/sequence/extract.py b/pandora/sequence/extract.py index 930131cd..90db3b33 100644 --- a/pandora/sequence/extract.py +++ b/pandora/sequence/extract.py @@ -96,7 +96,9 @@ class DataTimeline(): def get_frame(self, pos): frame = int(pos * self.fps) tile = int(frame * 8 / self.timeline_width) - if self.current_tile != tile: + if len(self.file_names) <= tile: + tile = len(self.file_names) - 1 + if self.current_tile != tile and len(self.file_names): self.timeline_image = Image.open(self.file_names[tile]) self.current_tile = tile x = frame * 8 - tile * self.timeline_width