mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-16 07:31:16 +02:00
Make EffectManager::GetEffectByIdentifier do what BatchCommands::GetAllCommands expects, and disable the BatchCommandDialog mEditParams button when illegal.
This commit is contained in:
@@ -82,6 +82,7 @@ void BatchCommandDialog::PopulateOrExchange(ShuttleGui &S)
|
|||||||
mCommand = S.AddTextBox(_("&Command"), wxT(""), 20);
|
mCommand = S.AddTextBox(_("&Command"), wxT(""), 20);
|
||||||
mCommand->SetEditable(false);
|
mCommand->SetEditable(false);
|
||||||
mEditParams = S.Id(EditParamsButtonID).AddButton(_("&Edit Parameters"));
|
mEditParams = S.Id(EditParamsButtonID).AddButton(_("&Edit Parameters"));
|
||||||
|
mEditParams->Enable( false ); // disable button as box is empty
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
|
||||||
|
@@ -118,6 +118,8 @@ Effect *EffectManager::GetEffect(int ID)
|
|||||||
|
|
||||||
Effect* EffectManager::GetEffectByIdentifier(const wxString strTarget, const int kFlags /*= ALL_EFFECTS*/)
|
Effect* EffectManager::GetEffectByIdentifier(const wxString strTarget, const int kFlags /*= ALL_EFFECTS*/)
|
||||||
{
|
{
|
||||||
|
if( strTarget == wxT("") ) // set GetEffectIdentifier to wxT("") to not show an effect in Batch mode
|
||||||
|
return NULL;
|
||||||
for (unsigned int i = 0; i < mEffects.GetCount(); i++)
|
for (unsigned int i = 0; i < mEffects.GetCount(); i++)
|
||||||
{
|
{
|
||||||
int nFlags = mEffects[i]->GetEffectFlags();
|
int nFlags = mEffects[i]->GetEffectFlags();
|
||||||
|
Reference in New Issue
Block a user