mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-03 06:03:13 +02:00
Fix status bar messages and disabling of pause button for scrubbing...
Reverts "Disable scrubbing when pause button is down."
This commit is contained in:
commit
3531073251
@ -95,9 +95,6 @@ enum CommandFlag : unsigned long long
|
||||
AudioStreamNotScrubbingFlag
|
||||
= 0x80000000ULL, // prl
|
||||
|
||||
// 33 bits! Boo-yah!
|
||||
AudioIONotPausedFlag = 0x100000000ULL, // prl
|
||||
|
||||
NoFlagsSpecifed = ~0ULL
|
||||
};
|
||||
|
||||
|
@ -1763,9 +1763,6 @@ CommandFlag AudacityProject::GetUpdateFlags()
|
||||
if(!GetScrubber().HasStartedScrubbing())
|
||||
flags |= AudioStreamNotScrubbingFlag;
|
||||
|
||||
if (!gAudioIO->IsPaused())
|
||||
flags |= AudioIONotPausedFlag;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -1053,10 +1053,6 @@ void CommandManager::TellUserWhyDisallowed( CommandFlag flagsGot, CommandMask fl
|
||||
reason = _("You must first select some audio for this to use.");
|
||||
else if( missingFlags & WaveTracksSelectedFlag)
|
||||
reason = _("You must first select some audio for this\n to use. (Selecting other kinds of track won't work.)");
|
||||
else if( missingFlags & AudioStreamNotScrubbingFlag )
|
||||
reason = _("Scrubbing may not be active.");
|
||||
else if( missingFlags & AudioIONotBusyFlag )
|
||||
reason = _("Playback may not be paused.");
|
||||
// If the only thing wrong was no tracks, we do nothing and don't report a problem
|
||||
else if( missingFlags == TracksExistFlag )
|
||||
return;
|
||||
|
@ -208,6 +208,12 @@ void Scrubber::MarkScrubStart(
|
||||
|
||||
ControlToolBar * const ctb = mProject->GetControlToolBar();
|
||||
ctb->SetPlay(true, ControlToolBar::PlayAppearance::Scrub);
|
||||
if(gAudioIO->IsPaused())
|
||||
ctb->Pause(); // un-pause
|
||||
|
||||
// This disables the pause button.
|
||||
ctb->EnableDisableButtons();
|
||||
|
||||
ctb->UpdateStatusBar(mProject);
|
||||
|
||||
CheckMenuItem();
|
||||
@ -245,8 +251,11 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx)
|
||||
);
|
||||
if (time1 != time0)
|
||||
{
|
||||
if (busy)
|
||||
if (busy) {
|
||||
auto position = mScrubStartPosition;
|
||||
ctb->StopPlaying();
|
||||
mScrubStartPosition = position;
|
||||
}
|
||||
|
||||
AudioIOStartStreamOptions options(mProject->GetDefaultPlayOptions());
|
||||
options.timeTrack = NULL;
|
||||
@ -733,10 +742,9 @@ bool Scrubber::CanScrub() const
|
||||
|
||||
void Scrubber::AddMenuItems()
|
||||
{
|
||||
auto extraFlags = WaveTracksExistFlag | AudioIONotPausedFlag;
|
||||
auto cm = mProject->GetCommandManager();
|
||||
auto flags = cm->GetDefaultFlags() | extraFlags;
|
||||
auto mask = cm->GetDefaultMask() | extraFlags;
|
||||
auto flags = cm->GetDefaultFlags() | WaveTracksExistFlag;
|
||||
auto mask = cm->GetDefaultMask() | WaveTracksExistFlag;
|
||||
|
||||
cm->BeginSubMenu(_("Scru&bbing"));
|
||||
for (const auto &item : menuItems) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user