From 3e72eadd633fe74d43c0d1830f38e16b132216a6 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 3 Mar 2017 19:37:39 +0300 Subject: [PATCH] Fix for the issue #2031 --- src/Config/Config_XMLReader.cpp | 4 ++++ src/Model/Model_Session.cpp | 1 - src/PythonAPI/initConfig.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) 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() -- 2.39.2