1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 23:21:12 +02:00

Bug1052 again: Push play button and change its image as soon as scrub click.

This commit is contained in:
Paul Licameli
2016-04-21 13:16:21 -04:00

View File

@@ -155,6 +155,7 @@ void Scrubber::MarkScrubStart(
mScrubStartClockTimeMillis = ::wxGetLocalTimeMillis();
ControlToolBar * const ctb = mProject->GetControlToolBar();
ctb->SetPlay(true, ControlToolBar::PlayAppearance::Scrub);
ctb->UpdateStatusBar(mProject);
mProject->GetTrackPanel()->HandleCursor(event);
}
@@ -312,17 +313,18 @@ void Scrubber::StopScrubbing()
{
mScrubStartPosition = -1;
mSmoothScrollingScrub = false;
const auto ctb = mProject->GetControlToolBar();
if (IsScrubbing())
{
if (gAudioIO->IsBusy()) {
ControlToolBar *const ctb = mProject->GetControlToolBar();
ctb->StopPlaying();
}
return;
}
else
return;
else {
// Didn't really play, but did change button apperance
ctb->SetPlay(false, ControlToolBar::PlayAppearance::Straight);
}
}
bool Scrubber::IsScrubbing() const