Skip to content

Fix #29333: Pause and select bug with repeats #29378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions src/playback/internal/playbackcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,9 @@ void PlaybackController::pause(bool select)

currentPlayer()->pause();

if (select) {
selectAtRawTick(m_currentTick);
if (select && m_notation) {
const Fraction playPositionFrac = Fraction::fromTicks(m_currentTick);
interaction()->findAndSelectChordRest(playPositionFrac);
}
}

Expand Down Expand Up @@ -732,21 +733,6 @@ void PlaybackController::resume()
currentPlayer()->resume(delay);
}

void PlaybackController::selectAtRawTick(const tick_t& rawTick)
{
if (!m_notation) {
return;
}

const RetVal<tick_t> playPositionTick = notationPlayback()->playPositionTickByRawTick(rawTick);
if (!playPositionTick.ret) {
return;
}

const Fraction playPositionFrac = Fraction::fromTicks(playPositionTick.val);
interaction()->findAndSelectChordRest(playPositionFrac);
}

secs_t PlaybackController::playbackStartSecs() const
{
if (!m_notation) {
Expand Down
2 changes: 0 additions & 2 deletions src/playback/internal/playbackcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ class PlaybackController : public IPlaybackController, public muse::actions::Act
void stop();
void resume();

void selectAtRawTick(const muse::midi::tick_t& rawTick);

muse::audio::secs_t playbackStartSecs() const;
muse::audio::secs_t playbackEndSecs() const;

Expand Down
Loading