1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Fix for bug #879

This commit is contained in:
Leland Lucius 2015-05-17 01:02:52 -05:00
parent b60e4e3b2c
commit 913cfe23b4
2 changed files with 13 additions and 2 deletions

View File

@ -1909,6 +1909,9 @@ bool AudacityProject::TryToMakeActionAllowed( wxUint32 & flags, wxUint32 flagsRq
{
bool bAllowed;
if( flags == 0 )
flags = GetUpdateFlags();
bAllowed = ((flags & mask) == (flagsRqd & mask));
if( bAllowed )
return true;

View File

@ -3089,10 +3089,18 @@ void EffectUIHost::OnApply(wxCommandEvent & evt)
return;
}
// Honor the "select all if none" preference...a little hackish, but whatcha gonna do...
if (!mIsBatch && mEffect->GetType() != EffectTypeGenerate && mProject->mViewInfo.selectedRegion.isPoint())
{
wxMessageBox(_("You must select audio in the project window."));
return;
wxUint32 flags = 0;
bool allowed = mProject->TryToMakeActionAllowed(flags,
WaveTracksSelectedFlag | TimeSelectedFlag,
WaveTracksSelectedFlag | TimeSelectedFlag);
if (!allowed)
{
wxMessageBox(_("You must select audio in the project window."));
return;
}
}
if (!mClient->ValidateUI())