From 3abd1c1ef66b36649d5d6d65da0bda2da5ef8396 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 11 May 2023 19:37:49 +0200 Subject: [PATCH] Stop playback when we reach the end of the data (#2085) Previously we would get stuck in "Play" mode, which is both weird and wasteful --- crates/re_viewer_context/src/time_control.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/re_viewer_context/src/time_control.rs b/crates/re_viewer_context/src/time_control.rs index 8840a4782168..2b7fb1a11160 100644 --- a/crates/re_viewer_context/src/time_control.rs +++ b/crates/re_viewer_context/src/time_control.rs @@ -142,9 +142,9 @@ impl TimeControl { .or_insert_with(|| TimeState::new(full_range.min)); if self.looping == Looping::Off && state.time >= full_range.max { - // Don't pause or rewind, just stop moving time forward - // until we receive more data! - // This is important for "live view". + // We've reached the end - stop playing. + state.time = full_range.max.into(); + self.pause(); return; }