mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Uncheck scrubbing menu items whenever scrub stops (ESC key, Stop button, other)
This commit is contained in:
@@ -342,16 +342,12 @@ void Scrubber::StopScrubbing()
|
||||
|
||||
mScrubStartPosition = -1;
|
||||
mSmoothScrollingScrub = false;
|
||||
const auto ctb = mProject->GetControlToolBar();
|
||||
|
||||
if (IsScrubbing())
|
||||
if (!IsScrubbing())
|
||||
{
|
||||
if (gAudioIO->IsBusy()) {
|
||||
ctb->StopPlaying();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Didn't really play, but did change button apperance
|
||||
// Marked scrub start, but
|
||||
// didn't really play, but did change button apperance
|
||||
const auto ctb = mProject->GetControlToolBar();
|
||||
ctb->SetPlay(false, ControlToolBar::PlayAppearance::Straight);
|
||||
}
|
||||
}
|
||||
@@ -596,9 +592,11 @@ void Scrubber::DoScrub(bool scroll, bool seek)
|
||||
UncheckAllMenuItems();
|
||||
CheckMenuItem();
|
||||
}
|
||||
else
|
||||
// unchecks items
|
||||
StopScrubbing();
|
||||
else {
|
||||
// This will call back to Scrubber::StopScrubbing
|
||||
const auto ctb = mProject->GetControlToolBar();
|
||||
ctb->StopPlaying();
|
||||
}
|
||||
}
|
||||
|
||||
void Scrubber::OnScrub()
|
||||
|
||||
@@ -37,6 +37,8 @@ public:
|
||||
// Returns true iff the event should be considered consumed by this:
|
||||
bool MaybeStartScrubbing(const wxMouseEvent &event);
|
||||
void ContinueScrubbing();
|
||||
|
||||
// This is meant to be called only from ControlToolBar
|
||||
void StopScrubbing();
|
||||
|
||||
wxCoord GetScrubStartPosition() const
|
||||
|
||||
Reference in New Issue
Block a user