mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-16 08:37:42 +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
|
// that indicates where the current play/record position is. (This also
|
||||||
// draws the moving vertical line.)
|
// draws the moving vertical line.)
|
||||||
|
|
||||||
// PRL: mIndicatorShowing never becomes true!
|
|
||||||
if (!gAudioIO->IsPaused() &&
|
if (!gAudioIO->IsPaused() &&
|
||||||
( mIndicatorShowing || gAudioIO->IsStreamActive(p->GetAudioIOToken()))
|
( mIndicatorShowing || gAudioIO->IsStreamActive(p->GetAudioIOToken()))
|
||||||
#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
#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
|
// Update the indicator in case it was damaged if this project is playing
|
||||||
|
|
||||||
// PRL: mIndicatorShowing never becomes true!
|
|
||||||
AudacityProject* p = GetProject();
|
AudacityProject* p = GetProject();
|
||||||
if (!gAudioIO->IsPaused() &&
|
if (!gAudioIO->IsPaused() &&
|
||||||
(mIndicatorShowing || gAudioIO->IsStreamActive(p->GetAudioIOToken())))
|
(mIndicatorShowing || gAudioIO->IsStreamActive(p->GetAudioIOToken())))
|
||||||
@ -2315,10 +2313,11 @@ bool TrackPanel::IsScrubbing()
|
|||||||
else if (mScrubToken == GetProject()->GetAudioIOToken())
|
else if (mScrubToken == GetProject()->GetAudioIOToken())
|
||||||
return true;
|
return true;
|
||||||
else {
|
else {
|
||||||
// Some other command might have stopped scrub play before we
|
|
||||||
// reached StopScrubbing()! But that is okay.
|
|
||||||
mScrubToken = -1;
|
mScrubToken = -1;
|
||||||
mScrubStartPosition = -1;
|
mScrubStartPosition = -1;
|
||||||
|
#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
||||||
|
mSmoothScrollingScrub = false;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2350,9 +2349,12 @@ bool TrackPanel::MaybeStartScrubbing(wxMouseEvent &event)
|
|||||||
return false;
|
return false;
|
||||||
else if (mScrubStartPosition >= 0) {
|
else if (mScrubStartPosition >= 0) {
|
||||||
const bool busy = gAudioIO->IsBusy();
|
const bool busy = gAudioIO->IsBusy();
|
||||||
if (busy && gAudioIO->GetNumCaptureChannels() > 0)
|
if (busy && gAudioIO->GetNumCaptureChannels() > 0) {
|
||||||
// Do not stop recording
|
// Do not stop recording, and don't try to start scrubbing after
|
||||||
|
// recording stops
|
||||||
|
mScrubStartPosition = -1;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
wxCoord position = event.m_x;
|
wxCoord position = event.m_x;
|
||||||
AudacityProject *p = GetActiveProject();
|
AudacityProject *p = GetActiveProject();
|
||||||
@ -2438,13 +2440,6 @@ bool TrackPanel::StopScrubbing()
|
|||||||
ctb->StopPlaying();
|
ctb->StopPlaying();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mScrubToken = -1;
|
|
||||||
mScrubStartPosition = -1;
|
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL
|
|
||||||
mSmoothScrollingScrub = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user