]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for registering parameters in command line mode
authorvsv <vsv@opencascade.com>
Wed, 15 Mar 2017 11:24:56 +0000 (14:24 +0300)
committervsv <vsv@opencascade.com>
Wed, 15 Mar 2017 11:25:15 +0000 (14:25 +0300)
src/ModelAPI/ModelAPI_Session.cpp
src/XGUI/XGUI_Workshop.cpp

index fba142217242795d627b5727602fdcd30e076a0e..b2f0eaf9b95cd362cec0def973df61d6a1eaa046 100644 (file)
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_Events.h>
 #include <ModelAPI_Validator.h>
+#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_ResultConstruction.h>
 
 #include <Config_ModuleReader.h>
+#include <Config_PropManager.h>
 
 #ifdef WIN32
 #include <windows.h>
@@ -53,6 +56,17 @@ std::shared_ptr<ModelAPI_Session> ModelAPI_Session::get()
 {
   if (!MY_MANAGER) {  // import Model library that implements this interface of ModelAPI
     Config_ModuleReader::loadLibrary("Model");
+
+    Config_PropManager::registerProp("Visualization", "body_deflection",
+                                     "Body deflection coefficient",
+                                     Config_Prop::Double,
+                                     ModelAPI_ResultBody::DEFAULT_DEFLECTION());
+
+    Config_PropManager::registerProp("Visualization", "construction_deflection",
+                                     "Construction deflection coefficient",
+                                     Config_Prop::Double,
+                                     ModelAPI_ResultConstruction::DEFAULT_DEFLECTION());
+
   }
   return MY_MANAGER;
 }
index baa7594cb21d38702667a093818af4ab721a140b..fa48ac096d22facd30d443615e2233274e4ae810 100755 (executable)
@@ -234,16 +234,6 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
   Config_PropManager::registerProp("Visualization", "result_part_color", "Part color",
                                    Config_Prop::Color, ModelAPI_ResultPart::DEFAULT_COLOR());
 
-  Config_PropManager::registerProp("Visualization", "body_deflection",
-                                   "Body deflection coefficient",
-                                   Config_Prop::Double,
-                                   ModelAPI_ResultBody::DEFAULT_DEFLECTION());
-
-  Config_PropManager::registerProp("Visualization", "construction_deflection",
-                                   "Construction deflection coefficient",
-                                   Config_Prop::Double,
-                                   ModelAPI_ResultConstruction::DEFAULT_DEFLECTION());
-
   if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "face-selection", true))
     myViewerSelMode.append(TopAbs_FACE);
   if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "edge-selection", true))