diff --git a/tsmark/video_annotator.py b/tsmark/video_annotator.py index c83d09d..7304bae 100755 --- a/tsmark/video_annotator.py +++ b/tsmark/video_annotator.py @@ -842,6 +842,7 @@ class World: if point_index is None: point_index = self.point_index if not point_index in self.points: + self.points_interpolation_required[point_index] = [] return try: @@ -865,6 +866,10 @@ class World: new_points = {k: v for k, v in self.points_interpolated[point_index].items()} + if len(self.points[point_index]) == 0: # no points yet + self.points_interpolation_required[point_index] = [] + return + if len(self.points[point_index]) == 1: # only one point added key = list(self.points[point_index].keys())[0] vals = self.points[point_index][key] @@ -1550,7 +1555,7 @@ class World: self.point_click = 0 else: self.point_index = chr(k2) - self.interpolate_set(refresh=True) + self.interpolate_set(point_index=self.point_index, refresh=True) elif k & 0xFF == ord("g"): # Go to self.shadow_text( frame_visu,