1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 09:01:13 +02:00

Merge: Scrubbing may not start during recording. You must Stop recording first.

This commit is contained in:
Paul-Licameli 2015-04-21 20:50:00 -04:00
commit 592f8408c7

View File

@ -2340,12 +2340,16 @@ bool TrackPanel::MaybeStartScrubbing(wxMouseEvent &event)
return false; return false;
else else
{ {
const bool busy = gAudioIO->IsBusy();
if (busy && gAudioIO->GetNumCaptureChannels() > 0)
// Do not stop recording
return false;
wxCoord position = event.m_x; wxCoord position = event.m_x;
AudacityProject *p = GetActiveProject(); AudacityProject *p = GetActiveProject();
if (p && if (p &&
abs(mScrubStartPosition - position) >= SCRUBBING_PIXEL_TOLERANCE) { abs(mScrubStartPosition - position) >= SCRUBBING_PIXEL_TOLERANCE) {
ControlToolBar * ctb = p->GetControlToolBar(); ControlToolBar * ctb = p->GetControlToolBar();
bool busy = gAudioIO->IsBusy();
double maxTime = p->GetTracks()->GetEndTime(); double maxTime = p->GetTracks()->GetEndTime();
double time0 = std::min(maxTime, PositionToTime(mScrubStartPosition, GetLeftOffset())); double time0 = std::min(maxTime, PositionToTime(mScrubStartPosition, GetLeftOffset()));
double time1 = std::min(maxTime, PositionToTime(position, GetLeftOffset())); double time1 = std::min(maxTime, PositionToTime(position, GetLeftOffset()));