]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Tests fix
authordbv <dbv@opencascade.com>
Fri, 15 Jul 2016 17:23:06 +0000 (20:23 +0300)
committerdbv <dbv@opencascade.com>
Fri, 15 Jul 2016 17:23:06 +0000 (20:23 +0300)
src/InitializationPlugin/InitializationPlugin_Plugin.cpp

index 3b3ba3c3b268d2e07bd20d4a43a581be03d22132..c03eb38d1061a12cab0ef184663db345d92c0feb 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Document.h>
+#include <ModelAPI_AttributeBoolean.h>
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeSelection.h>
@@ -15,7 +16,7 @@
 
 #include <memory>
 
-#define NESTED_TOOLBOX_FIX
+#define NESTED_WIDGETS_FIX
 
 // the only created instance of this plugin
 static InitializationPlugin_Plugin* MY_INITIALIZATIONPLUGIN_INSTANCE =
@@ -92,7 +93,7 @@ FeaturePtr InitializationPlugin_Plugin::createPlane(DocumentPtr theDoc, double t
 {
   FeaturePtr aPlane = theDoc->addFeature("Plane");
   aPlane->string("creation_method")->setValue("by_general_equation");
-#ifdef NESTED_TOOLBOX_FIX
+#ifdef NESTED_WIDGETS_FIX
   aPlane->string("by_other_plane_option")->setValue("by_distance_from_other");
   aPlane->real("distance")->setValue(0);
 #endif
@@ -154,6 +155,15 @@ FeaturePtr InitializationPlugin_Plugin::createAxis(DocumentPtr theDoc, FeaturePt
   aAxis->real("Y_Direction")->setValue(theY);
   aAxis->real("Z_Direction")->setValue(theZ);
 
+#ifdef NESTED_WIDGETS_FIX
+  aAxis->string("use_offset1")->setValue("");
+  aAxis->real("offset1")->setValue(0);
+  aAxis->boolean("reverse_offset1")->setValue(false);
+  aAxis->string("use_offset2")->setValue("");
+  aAxis->real("offset2")->setValue(0);
+  aAxis->boolean("reverse_offset2")->setValue(false);
+#endif
+
   if (theX != 0) {
     aAxis->data()->setName("OX");
   } else if (theY != 0) {