From adb33f466e4d9a1fa37b325af17c6655d14298c3 Mon Sep 17 00:00:00 2001 From: James Crook Date: Wed, 8 Aug 2018 18:40:16 +0100 Subject: [PATCH] Bug 1494 - Strange Pause behaviour with seeking/scrubbing Now instead of the (strange) Pause, we Stop. --- src/toolbars/ControlToolBar.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index bc5faad63..abf235dcd 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -1341,6 +1341,19 @@ void ControlToolBar::OnPause(wxCommandEvent & WXUNUSED(evt)) } #ifdef EXPERIMENTAL_SCRUBBING_SUPPORT + + // Bug 1494 - Pausing a seek or scrub should just STOP as + // it is confusing to be in a paused scrub state. + bool bStopInstead = mPaused && + gAudioIO->IsScrubbing() && + !GetActiveProject()->GetScrubber().IsSpeedPlaying(); + + if (bStopInstead) { + wxCommandEvent dummy; + OnStop(dummy); + return; + } + if (gAudioIO->IsScrubbing()) GetActiveProject()->GetScrubber().Pause(mPaused); else