mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
Scrub during play stops play, repositions play head
This commit is contained in:
parent
66454b7e4c
commit
c5d42377b7
@ -203,19 +203,26 @@ void Scrubber::MarkScrubStart(
|
||||
SetScrollScrubbing (smoothScrolling);
|
||||
#endif
|
||||
mAlwaysSeeking = alwaysSeeking;
|
||||
mScrubStartPosition = xx;
|
||||
mScrubStartClockTimeMillis = ::wxGetLocalTimeMillis();
|
||||
|
||||
ControlToolBar * const ctb = mProject->GetControlToolBar();
|
||||
|
||||
// Stop any play in progress
|
||||
ctb->StopPlaying();
|
||||
// Usually the timer handler of TrackPanel does this, but we do this now,
|
||||
// so that same timer does not StopPlaying() again after this function and destroy
|
||||
// scrubber state
|
||||
mProject->SetAudioIOToken(0);
|
||||
|
||||
ctb->SetPlay(true, ControlToolBar::PlayAppearance::Scrub);
|
||||
if(gAudioIO->IsPaused())
|
||||
ctb->Pause(); // un-pause
|
||||
|
||||
// This disables the pause button.
|
||||
ctb->EnableDisableButtons();
|
||||
|
||||
ctb->UpdateStatusBar(mProject);
|
||||
|
||||
mScrubStartPosition = xx;
|
||||
mScrubStartClockTimeMillis = ::wxGetLocalTimeMillis();
|
||||
|
||||
CheckMenuItem();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user