Skip to content

Commit 1433922

Browse files
IsseWWumpf
andauthored
Fix pressing the play button sometimes going to follow mode (#11609)
### Related * Part of #11585 ### What Fixes a bug where pressing the play button in some contexts sometimes went to follow mode instead of playing mode. --------- Co-authored-by: Andreas Reich <andreas@rerun.io>
1 parent 08278e8 commit 1433922

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

crates/viewer/re_time_panel/src/time_control_ui.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ You can also define your own timelines, e.g. for sensor time or camera frame num
155155
.on_hover_ui(|ui| UICommand::PlaybackTogglePlayPause.tooltip_ui(ui))
156156
.clicked()
157157
{
158-
time_commands.push(TimeControlCommand::TogglePlayPause);
158+
if matches!(time_ctrl.play_state(), PlayState::Playing) {
159+
time_commands.push(TimeControlCommand::SetPlayState(PlayState::Paused));
160+
} else {
161+
time_commands.push(TimeControlCommand::SetPlayState(PlayState::Playing));
162+
}
159163
}
160164
}
161165

0 commit comments

Comments
 (0)