mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-08 14:13:57 +01:00
Fix for bug #1017
This commit is contained in:
@@ -1346,14 +1346,17 @@ void PluginDescriptor::SetImporterExtensions(const wxArrayString & extensions)
|
|||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
bool PluginManager::IsPluginRegistered(const PluginID & ID)
|
bool PluginManager::IsPluginRegistered(const wxString & path)
|
||||||
{
|
{
|
||||||
if (mPlugins.find(ID) == mPlugins.end())
|
for (PluginMap::iterator iter = mPlugins.begin(); iter != mPlugins.end(); ++iter)
|
||||||
{
|
{
|
||||||
return false;
|
if (iter->second.GetPath().IsSameAs(path))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PluginID & PluginManager::RegisterPlugin(ModuleInterface *module)
|
const PluginID & PluginManager::RegisterPlugin(ModuleInterface *module)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public:
|
|||||||
|
|
||||||
// PluginManagerInterface implementation
|
// PluginManagerInterface implementation
|
||||||
|
|
||||||
virtual bool IsPluginRegistered(const PluginID & ID);
|
virtual bool IsPluginRegistered(const wxString & path);
|
||||||
|
|
||||||
virtual const PluginID & RegisterPlugin(ModuleInterface *module);
|
virtual const PluginID & RegisterPlugin(ModuleInterface *module);
|
||||||
virtual const PluginID & RegisterPlugin(ModuleInterface *provider, EffectIdentInterface *effect);
|
virtual const PluginID & RegisterPlugin(ModuleInterface *provider, EffectIdentInterface *effect);
|
||||||
|
|||||||
@@ -288,11 +288,11 @@ bool BuiltinEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
|
|||||||
{
|
{
|
||||||
for (size_t i = 0; i < WXSIZEOF(kEffectNames); i++)
|
for (size_t i = 0; i < WXSIZEOF(kEffectNames); i++)
|
||||||
{
|
{
|
||||||
PluginID ID(wxString(BUILTIN_EFFECT_PREFIX) + kEffectNames[i]);
|
wxString path(wxString(BUILTIN_EFFECT_PREFIX) + kEffectNames[i]);
|
||||||
|
|
||||||
if (!pm.IsPluginRegistered(ID))
|
if (!pm.IsPluginRegistered(path))
|
||||||
{
|
{
|
||||||
RegisterPlugin(pm, ID);
|
RegisterPlugin(pm, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user