stay at last tile
This commit is contained in:
parent
3dc8a0aba0
commit
769f0b7fd2
1 changed files with 3 additions and 1 deletions
|
@ -96,7 +96,9 @@ class DataTimeline():
|
||||||
def get_frame(self, pos):
|
def get_frame(self, pos):
|
||||||
frame = int(pos * self.fps)
|
frame = int(pos * self.fps)
|
||||||
tile = int(frame * 8 / self.timeline_width)
|
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.timeline_image = Image.open(self.file_names[tile])
|
||||||
self.current_tile = tile
|
self.current_tile = tile
|
||||||
x = frame * 8 - tile * self.timeline_width
|
x = frame * 8 - tile * self.timeline_width
|
||||||
|
|
Loading…
Reference in a new issue