Salome HOME
Issue #1896: Inspect SALOME modules before loading of XML configurations
[modules/shaper.git] / src / Model / Model_Session.cpp
index 9d13485f3d8a1fed152f50aef9875fab175c676a..cbe0e6a523da9f3ebc457e5f65ebf67ec3088a4f 100644 (file)
@@ -191,6 +191,7 @@ std::shared_ptr<ModelAPI_Document> Model_Session::moduleDocument()
   if (aFirstCall) {
     // to be sure that plugins are loaded,
     // even before the first "createFeature" call (in unit tests)
+
     LoadPluginsInfo();
     // creation of the root document is always outside of the transaction, so, avoid checking it
     setCheckTransactions(false);
@@ -266,7 +267,7 @@ void Model_Session::setActiveDocument(
         bool aWasChecked = myCheckTransactions;
         setCheckTransactions(false);
         TDF_LabelList anEmptyUpdated;
-        aDoc->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true);
+        aDoc->objects()->synchronizeFeatures(anEmptyUpdated, true, true, false, true);
         if (aWasChecked)
             setCheckTransactions(true);
       }
@@ -329,7 +330,7 @@ std::shared_ptr<ModelAPI_Document> Model_Session::copy(
   TDF_CopyTool::Copy(aDS, aRT);
 
   TDF_LabelList anEmptyUpdated;
-  aNew->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true);
+  aNew->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true, true);
   return aNew;
 }
 
@@ -434,7 +435,7 @@ void Model_Session::LoadPluginsInfo()
 {
   if (myPluginsInfoLoaded)  // nothing to do
     return;
-
+  Config_ModuleReader::loadScript("salome.shaper.initConfig");
   // Read plugins information from XML files
   Config_ModuleReader aModuleReader(Config_FeatureMessage::MODEL_EVENT());
   aModuleReader.readAll();