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:
parent
b60e4e3b2c
commit
913cfe23b4
@ -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;
|
||||
|
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user