From c6bbe4c3dae8a52bb4b7a3c720af97bc3bd69769 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Fri, 5 Jan 2018 18:17:21 -0500 Subject: [PATCH] Fix subtle error revealed by the previous commit ... ... A "translated" effect family string, plus "/Enable", was used as a registry key for lookup! It is wrong to key on a translation. But in fact exhaustive search for "/Enable" shows that the only such strings for which a written (by EffectsPrefs) registry value could be found were AudioUnit Ladspa LV2 Nyquist VAMP VST And none of these was actually a msgid in audacity.pot. So nothing bad can really have happened in other locale settings. --- src/PluginManager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index ccb5435e5..da819528e 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -2457,7 +2457,8 @@ const PluginDescriptor *PluginManager::GetFirstPlugin(PluginType type) bool familyEnabled = true; if (type == PluginTypeEffect) { - gPrefs->Read(plug.GetTranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); + // This preference may be written by EffectsPrefs + gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); } if (plug.IsValid() && plug.IsEnabled() && plug.GetPluginType() == type && familyEnabled) { @@ -2476,7 +2477,8 @@ const PluginDescriptor *PluginManager::GetNextPlugin(PluginType type) bool familyEnabled = true; if (type == PluginTypeEffect) { - gPrefs->Read(plug.GetTranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); + // This preference may be written by EffectsPrefs + gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); } if (plug.IsValid() && plug.IsEnabled() && plug.GetPluginType() == type && familyEnabled) { @@ -2496,6 +2498,7 @@ const PluginDescriptor *PluginManager::GetFirstPluginForEffectType(EffectType ty PluginDescriptor & plug = mPluginsIter->second; bool familyEnabled; + // This preference may be written by EffectsPrefs gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled) { @@ -2519,7 +2522,8 @@ const PluginDescriptor *PluginManager::GetNextPluginForEffectType(EffectType typ { PluginDescriptor & plug = mPluginsIter->second; bool familyEnabled; - gPrefs->Read(plug.GetTranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); + // This preference may be written by EffectsPrefs + gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true); if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled) { if (plug.IsInstantiated() && em.IsHidden(plug.GetID()))