From: mpv Date: Fri, 3 Mar 2017 16:37:39 +0000 (+0300) Subject: Fix for the issue #2031 X-Git-Tag: V_2.7.0~247^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3e72eadd633fe74d43c0d1830f38e16b132216a6;p=modules%2Fshaper.git Fix for the issue #2031 --- diff --git a/src/Config/Config_XMLReader.cpp b/src/Config/Config_XMLReader.cpp index 1a53ece53..4cd1149f8 100644 --- a/src/Config/Config_XMLReader.cpp +++ b/src/Config/Config_XMLReader.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -79,6 +80,9 @@ std::string Config_XMLReader::pluginConfigFile() void Config_XMLReader::readAll() { + // to load external modules dependencies (like GEOm for Connector Feature + Config_ModuleReader::loadScript("salome.shaper.initConfig", false); + xmlNodePtr aRoot = findRoot(); readRecursively(aRoot); } diff --git a/src/Model/Model_Session.cpp b/src/Model/Model_Session.cpp index ee29017f4..44fcf4f18 100644 --- a/src/Model/Model_Session.cpp +++ b/src/Model/Model_Session.cpp @@ -435,7 +435,6 @@ void Model_Session::LoadPluginsInfo() { if (myPluginsInfoLoaded) // nothing to do return; - Config_ModuleReader::loadScript("salome.shaper.initConfig", false); // Read plugins information from XML files Config_ModuleReader aModuleReader(Config_FeatureMessage::MODEL_EVENT()); aModuleReader.readAll(); diff --git a/src/PythonAPI/initConfig.py b/src/PythonAPI/initConfig.py index 6e130ee0c..f0e95b3d6 100644 --- a/src/PythonAPI/initConfig.py +++ b/src/PythonAPI/initConfig.py @@ -6,6 +6,8 @@ import salome import SALOME_ModuleCatalog import ConfigAPI +# needed on immediate start of SHAPER from SALOME: salome.naming_service is not initialized then +salome.salome_init() obj = salome.naming_service.Resolve('Kernel/ModulCatalog') catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) aCorbaModules = catalog.GetComponentList()