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