1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 14:13:57 +01:00

Auto-Select off by default.

I've implemented three states for what to do if no selection:
0 - Grey out (no longer used)
1 - Auto-select
2 - Give the warning message and try again.
This commit is contained in:
James Crook
2017-06-09 19:11:05 +01:00
parent 0d899b0163
commit adc7312954
10 changed files with 188 additions and 166 deletions

View File

@@ -3171,14 +3171,13 @@ void EffectUIHost::OnApply(wxCommandEvent & evt)
if (!mIsBatch && mEffect->GetType() != EffectTypeGenerate && mProject->mViewInfo.selectedRegion.isPoint())
{
auto flags = AlwaysEnabledFlag;
bool allowed = mProject->TryToMakeActionAllowed(flags,
WaveTracksSelectedFlag | TimeSelectedFlag,
WaveTracksSelectedFlag | TimeSelectedFlag);
bool allowed = mProject->ReportIfActionNotAllowed(
mEffect->GetName(),
flags,
WaveTracksSelectedFlag | TimeSelectedFlag,
WaveTracksSelectedFlag | TimeSelectedFlag);
if (!allowed)
{
wxMessageBox(_("You must select audio in the project window."));
return;
}
}
if (!mClient->ValidateUI())