mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Bugs 961, 962 fixed
Bug 961 - Play cursor broken after double-click scrub play Bug 962 - Scrubbing gesture during recording places Audacity in scrubbing mode when recording stops
This commit is contained in:
parent
edf05c1ce1
commit
51fc1c96db
@ -1100,7 +1100,6 @@ void TrackPanel::OnTimer()
|
||||
// that indicates where the current play/record position is. (This also
|
||||
// draws the moving vertical line.)
|
||||
|
||||
// PRL: mIndicatorShowing never becomes true!
|
||||
if (!gAudioIO->IsPaused() &&
|
||||
( mIndicatorShowing || gAudioIO->IsStreamActive(p->GetAudioIOToken()))
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
||||
@ -1514,7 +1513,6 @@ void TrackPanel::OnPaint(wxPaintEvent & /* event */)
|
||||
|
||||
// Update the indicator in case it was damaged if this project is playing
|
||||
|
||||
// PRL: mIndicatorShowing never becomes true!
|
||||
AudacityProject* p = GetProject();
|
||||
if (!gAudioIO->IsPaused() &&
|
||||
(mIndicatorShowing || gAudioIO->IsStreamActive(p->GetAudioIOToken())))
|
||||
@ -2315,10 +2313,11 @@ bool TrackPanel::IsScrubbing()
|
||||
else if (mScrubToken == GetProject()->GetAudioIOToken())
|
||||
return true;
|
||||
else {
|
||||
// Some other command might have stopped scrub play before we
|
||||
// reached StopScrubbing()! But that is okay.
|
||||
mScrubToken = -1;
|
||||
mScrubStartPosition = -1;
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
||||
mSmoothScrollingScrub = false;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2350,9 +2349,12 @@ bool TrackPanel::MaybeStartScrubbing(wxMouseEvent &event)
|
||||
return false;
|
||||
else if (mScrubStartPosition >= 0) {
|
||||
const bool busy = gAudioIO->IsBusy();
|
||||
if (busy && gAudioIO->GetNumCaptureChannels() > 0)
|
||||
// Do not stop recording
|
||||
if (busy && gAudioIO->GetNumCaptureChannels() > 0) {
|
||||
// Do not stop recording, and don't try to start scrubbing after
|
||||
// recording stops
|
||||
mScrubStartPosition = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxCoord position = event.m_x;
|
||||
AudacityProject *p = GetActiveProject();
|
||||
@ -2438,13 +2440,6 @@ bool TrackPanel::StopScrubbing()
|
||||
ctb->StopPlaying();
|
||||
}
|
||||
}
|
||||
mScrubToken = -1;
|
||||
mScrubStartPosition = -1;
|
||||
|
||||
#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
||||
mSmoothScrollingScrub = false;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user