1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 17:49:45 +02:00

Bug1282: change of enabled state of Stereo To Mono should be persistent

This commit is contained in:
Paul Licameli 2016-04-05 18:43:43 -04:00
parent df45886d6b
commit cea79d5b73
2 changed files with 10 additions and 1 deletions

View File

@ -875,7 +875,7 @@ void AudacityProject::CreateMenusAndCommands()
// plug-in manager, as if an effect. Decide whether to show or hide it.
const PluginID ID = EffectManager::Get().GetEffectByIdentifier(wxT("StereoToMono"));
const PluginDescriptor *plug = PluginManager::Get().GetPlugin(ID);
if (plug)
if (plug && plug->IsEnabled())
c->AddItem(wxT("Stereo to Mono"), _("Stereo Trac&k to Mono"), FN(OnStereoToMono),
AudioIONotBusyFlag | StereoRequiredFlag | WaveTracksSelectedFlag,
AudioIONotBusyFlag | StereoRequiredFlag | WaveTracksSelectedFlag);

View File

@ -1345,6 +1345,7 @@ void PluginDescriptor::SetImporterExtensions(const wxArrayString & extensions)
#define KEY_EFFECTTYPE_ANALYZE wxT("Analyze")
#define KEY_EFFECTTYPE_GENERATE wxT("Generate")
#define KEY_EFFECTTYPE_PROCESS wxT("Process")
#define KEY_EFFECTTYPE_HIDDEN wxT("Hidden")
#define KEY_IMPORTERIDENT wxT("ImporterIdent")
#define KEY_IMPORTERFILTER wxT("ImporterFilter")
#define KEY_IMPORTEREXTENSIONS wxT("ImporterExtensions")
@ -1909,6 +1910,10 @@ void PluginManager::LoadGroup(PluginType type)
{
plug.SetEffectType(EffectTypeProcess);
}
else if (strVal.IsSameAs(KEY_EFFECTTYPE_HIDDEN))
{
plug.SetEffectType(EffectTypeHidden);
}
else
{
continue;
@ -2087,6 +2092,10 @@ void PluginManager::SaveGroup(PluginType type)
{
stype = KEY_EFFECTTYPE_PROCESS;
}
else if (etype == EffectTypeHidden)
{
stype = KEY_EFFECTTYPE_HIDDEN;
}
mRegistry->Write(KEY_EFFECTTYPE, stype);
mRegistry->Write(KEY_EFFECTFAMILY, plug.GetEffectFamily(false));
mRegistry->Write(KEY_EFFECTDEFAULT, plug.IsEffectDefault());