1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-23 07:40:05 +02:00

Bug 1906 - Issues with dynamic Play-at-Speed

This fix addresses the remaining issue, issue 4, that the selection was often cleared when Play-at-Speed stopped.
The problem was that Scrubbing 'Set Selection to here' code was not being disabled by the Play-at-Speed state.
This commit is contained in:
James Crook 2018-07-27 17:13:03 +01:00
parent 9cbb67acba
commit f13e621bc1
2 changed files with 9 additions and 1 deletions

View File

@ -2930,7 +2930,13 @@ bool AudacityProject::DoPlayStopSelect(bool click, bool shift)
// change the selection
auto time = gAudioIO->GetStreamTime();
auto &selection = mViewInfo.selectedRegion;
if (shift && click) {
// Test WasSpeedPlaying(), not IsSpeedPlaying()
// as we could be stopped now.
if (GetScrubber().WasSpeedPlaying())
{
;// don't change the selection.
}
else if (shift && click) {
// Change the region selection, as if by shift-click at the play head
auto t0 = selection.t0(), t1 = selection.t1();
if (time < t0)

View File

@ -92,6 +92,8 @@ public:
wxCoord GetScrubStartPosition() const
{ return mScrubStartPosition; }
bool WasSpeedPlaying() const
{ return mSpeedPlaying;}
bool IsSpeedPlaying() const
{ return IsScrubbing() && mSpeedPlaying; }
// True iff the user has clicked to start scrub and not yet stopped,