From: vsv Date: Wed, 15 Mar 2017 11:24:56 +0000 (+0300) Subject: Fix for registering parameters in command line mode X-Git-Tag: V_2.7.0~225 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d0add0e964478b0c8f08a577ffe3a8dc0a7fd60d;p=modules%2Fshaper.git Fix for registering parameters in command line mode --- diff --git a/src/ModelAPI/ModelAPI_Session.cpp b/src/ModelAPI/ModelAPI_Session.cpp index fba142217..b2f0eaf9b 100644 --- a/src/ModelAPI/ModelAPI_Session.cpp +++ b/src/ModelAPI/ModelAPI_Session.cpp @@ -28,8 +28,11 @@ #include #include #include +#include +#include #include +#include #ifdef WIN32 #include @@ -53,6 +56,17 @@ std::shared_ptr 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; } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index baa7594cb..fa48ac096 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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))