mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Correct switching between scrub and seek in progress
This commit is contained in:
@@ -808,14 +808,17 @@ void Scrubber::DoScrub()
|
||||
|
||||
void Scrubber::OnScrubOrSeek(bool seek)
|
||||
{
|
||||
mSeeking = seek;
|
||||
bool skip = false;
|
||||
|
||||
if (HasStartedScrubbing()) {
|
||||
skip = (mSeeking != seek); // just switching mode
|
||||
// Show the correct status.
|
||||
const auto ctb = mProject->GetControlToolBar();
|
||||
ctb->UpdateStatusBar(mProject);
|
||||
}
|
||||
|
||||
mSeeking = seek;
|
||||
|
||||
auto ruler = mProject->GetRulerPanel();
|
||||
if (ruler)
|
||||
// Update button images
|
||||
@@ -825,7 +828,8 @@ void Scrubber::OnScrubOrSeek(bool seek)
|
||||
scrubbingToolBar->EnableDisableButtons();
|
||||
scrubbingToolBar->RegenerateTooltips();
|
||||
|
||||
DoScrub();
|
||||
if (!skip)
|
||||
DoScrub();
|
||||
|
||||
CheckMenuItems();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user