Commit 9c1aad8c authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

BUG #13488. Fixed XML loading order during initialization.

The XMLs were not loaded in the right order when auto-loaded plugins were
present. Fixed that. We need to process the xmls from vtkPVInitializerPlugin
before any other plugins.

Change-Id: I41af5ab6e68e33da9607023cf87a2b6b24e1b687
parent 4a1d587e
......@@ -455,20 +455,39 @@ vtkSIProxyDefinitionManager::vtkSIProxyDefinitionManager()
this->Internals = new vtkInternals;
this->InternalsFlatten = new vtkInternals;
// Load the generated modules
// # include "vtkParaViewIncludeModulesToSMApplication.h"
vtkPVPluginTracker* tracker = vtkPVPluginTracker::GetInstance();
// Load the core xmls.
// These are loaded from the vtkPVInitializerPlugin plugin.
for (unsigned int cc=0; cc < tracker->GetNumberOfPlugins(); cc++)
{
vtkPVPlugin* plugin = tracker->GetPlugin(cc);
if (plugin && strcmp(plugin->GetPluginName(), "vtkPVInitializerPlugin") == 0)
{
this->HandlePlugin(plugin);
break;
}
}
// Now, process any other loaded plugins. This has to happen after loading the
// core xmls (BUG #13488).
for (unsigned int cc=0; cc < tracker->GetNumberOfPlugins(); cc++)
{
vtkPVPlugin* plugin = tracker->GetPlugin(cc);
if (plugin && strcmp(plugin->GetPluginName(), "vtkPVInitializerPlugin") == 0)
{
continue;
}
this->HandlePlugin(plugin);
}
// Now register with the plugin tracker, so that when new plugins are loaded,
// Register with the plugin tracker, so that when new plugins are loaded,
// we parse the XML if provided and automatically add it to the proxy
// definitions.
vtkPVPluginTracker* tracker = vtkPVPluginTracker::GetInstance();
tracker->AddObserver( vtkCommand::RegisterEvent, this,
&vtkSIProxyDefinitionManager::OnPluginLoaded);
// process any already loaded plugins.
for (unsigned int cc=0; cc < tracker->GetNumberOfPlugins(); cc++)
{
this->HandlePlugin(tracker->GetPlugin(cc));
}
}
//---------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment