mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
Fix a few things with chain/effect parameters as reported by Gale
This commit is contained in:
parent
7950d4fd5a
commit
20fbb163d2
@ -349,7 +349,16 @@ wxString BatchCommands::PromptForPresetFor(const wxString & command, const wxStr
|
|||||||
return wxEmptyString; // effect not found.
|
return wxEmptyString; // effect not found.
|
||||||
}
|
}
|
||||||
|
|
||||||
return EffectManager::Get().GetPreset(ID, params, parent);
|
wxString preset = EffectManager::Get().GetPreset(ID, params, parent);
|
||||||
|
|
||||||
|
// Preset will be empty if the user cancelled the dialog, so return the original
|
||||||
|
// parameter value.
|
||||||
|
if (preset.IsEmpty())
|
||||||
|
{
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
return preset;
|
||||||
}
|
}
|
||||||
|
|
||||||
double BatchCommands::GetEndTime()
|
double BatchCommands::GetEndTime()
|
||||||
|
@ -2289,7 +2289,19 @@ wxFileConfig *PluginManager::GetSettings()
|
|||||||
|
|
||||||
bool PluginManager::HasGroup(const wxString & group)
|
bool PluginManager::HasGroup(const wxString & group)
|
||||||
{
|
{
|
||||||
return GetSettings()->HasGroup(group);
|
wxFileConfig *settings = GetSettings();
|
||||||
|
|
||||||
|
bool res = settings->HasGroup(group);
|
||||||
|
if (res)
|
||||||
|
{
|
||||||
|
// The group exists, but empty groups aren't considered valid
|
||||||
|
wxString oldPath = settings->GetPath();
|
||||||
|
settings->SetPath(group);
|
||||||
|
res = settings->GetNumberOfEntries() || settings->GetNumberOfGroups();
|
||||||
|
settings->SetPath(oldPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PluginManager::GetSubgroups(const wxString & group, wxArrayString & subgroups)
|
bool PluginManager::GetSubgroups(const wxString & group, wxArrayString & subgroups)
|
||||||
|
@ -168,6 +168,13 @@ wxString EffectManager::GetEffectParameters(const PluginID & ID)
|
|||||||
|
|
||||||
effect->GetAutomationParameters(parms);
|
effect->GetAutomationParameters(parms);
|
||||||
|
|
||||||
|
// Some effects don't have automatable parameters and will not return
|
||||||
|
// anything, so try to get the active preset (current or factory).
|
||||||
|
if (parms.IsEmpty())
|
||||||
|
{
|
||||||
|
parms = GetDefaultPreset(ID);
|
||||||
|
}
|
||||||
|
|
||||||
return parms;
|
return parms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user