Skip to content

Fix pressing the play button sometimes going to follow mode#11609

Merged
IsseW merged 3 commits intomainfrom
isse/fix-play-going-to-follow
Oct 22, 2025
Merged

Fix pressing the play button sometimes going to follow mode#11609
IsseW merged 3 commits intomainfrom
isse/fix-play-going-to-follow

Conversation

@IsseW
Copy link
Member

@IsseW IsseW commented Oct 21, 2025

Related

What

Fixes a bug where pressing the play button in some contexts sometimes went to follow mode instead of playing mode.

@IsseW IsseW added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself include in changelog labels Oct 21, 2025
@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Web viewer built successfully.

Result Commit Link Manifest
9c8fafd https://rerun.io/viewer/pr/11609 +nightly +main

View image diff on kitdiff.

Note: This comment is updated whenever you push a commit.

.clicked()
{
time_commands.push(TimeControlCommand::TogglePlayPause);
time_commands.push(TimeControlCommand::SetPlayState(PlayState::Playing));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks suspicious (like we can't pause any more). There is probably a good reason for this, could we maybe document that?

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the bug was some timing issue in the command where toggle may cause issues somehow? Bit confused about why toggle doesn't work here. Also, isn't the play button changing its icon to pause... well clearly the code here is a pure play button as it always uses the icons::PLAY icon

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right so actually we could pause with the play button here, that was actually nice. Do we have to break this?

@IsseW
Copy link
Member Author

IsseW commented Oct 21, 2025

right so actually we could pause with the play button here, that was actually nice. Do we have to break this?

Yeah, I made that change some time ago. Before which it just switched to playing mode.

We could if we want to have a check like

if not playing mode {
	go to playing mode
} else {
	go to paused mode
}

@IsseW
Copy link
Member Author

IsseW commented Oct 21, 2025

Bit confused about why toggle doesn't work here.

Toggle switches back to the last playing mode it seems, so if we were following last it switches to that.

@aedm
Copy link
Member

aedm commented Oct 21, 2025

Toggle switches back to the last playing mode it seems, so if we were following last it switches to that.

If we don't want that, we might fix it where it happens:

@IsseW
Copy link
Member Author

IsseW commented Oct 21, 2025

Toggle switches back to the last playing mode it seems, so if we were following last it switches to that.

If we don't want that, we might fix it where it happens:

I think we do want that. When pressing space I think it makes sense to switch back to following at least

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx! 👍

@IsseW IsseW merged commit 1433922 into main Oct 22, 2025
40 checks passed
@IsseW IsseW deleted the isse/fix-play-going-to-follow branch October 22, 2025 06:35
abey79 pushed a commit that referenced this pull request Oct 24, 2025
### 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪳 bug Something isn't working include in changelog 📺 re_viewer affects re_viewer itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants