]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for registering of parameters in command line.
authorvsv <vsv@opencascade.com>
Wed, 15 Mar 2017 08:52:05 +0000 (11:52 +0300)
committervsv <vsv@opencascade.com>
Wed, 15 Mar 2017 08:52:05 +0000 (11:52 +0300)
src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h
src/PartSet/PartSet_PreviewPlanes.h

index 4c20ecd892370b5306082d94e9935b1e38f8d735..812f54ce63dfcd567c7948aa2a20a195cfd3f324 100644 (file)
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Document.h>
 
+#define SKETCH_WIDTH        "4"
+/// face of the square-face displayed for selection of general plane
+#define PLANE_SIZE          "200"
+
 // the only created instance of this plugin
 static ConstructionPlugin_Plugin* MY_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin();
 
@@ -31,6 +35,13 @@ ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
   aFactory->registerValidator("ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes",
                               new ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes());
 
+  Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_size", "Size", Config_Prop::Double,
+                                   PLANE_SIZE);
+  Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_thickness", "Thickness",
+                                   Config_Prop::Integer, SKETCH_WIDTH);
+  Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane",
+    "Rotate to plane when selected", Config_Prop::Boolean, "false");
+
   // register this plugin
   ModelAPI_Session::get()->registerPlugin(this);
 
index 760234e1fd1cb4db515516d168ef4e979c5a8ed4..14f18c9422e0cd84ed0076042b8fbb90f54b43de 100755 (executable)
@@ -240,16 +240,6 @@ void PartSet_Module::registerValidators()
   aFactory->registerValidator("PartSet_ProjectionSelection", new PartSet_ProjectionSelection);
 }
 
-void PartSet_Module::registerProperties()
-{
-  Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_size", "Size", Config_Prop::Double,
-                                   PLANE_SIZE);
-  Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_thickness", "Thickness",
-                                   Config_Prop::Integer, SKETCH_WIDTH);
-  Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane",
-    "Rotate to plane when selected", Config_Prop::Boolean, "false");
-}
-
 void PartSet_Module::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget,
                                             const bool isToConnect)
 {
index f5f8976869d1bbd05ea684142cde789d114eb559..ed00ebef5a55129b9a54dd6286a2b17de5ce806f 100755 (executable)
@@ -379,9 +379,6 @@ protected:
   /// Register validators for this module
   virtual void registerValidators();
 
-  /// Register properties of this module
-  virtual void registerProperties();
-
   /// Connects or disconnects to the value changed signal of the property panel widgets
   /// \param theWidget a property contol widget
   /// \param isToConnect a boolean value whether connect or disconnect
index 955f5dcf2516489ff81432f3b0c8949c6d012df8..db14f27297ad7bb4f469638e66f2736ada6d35e0 100755 (executable)
 
 class ModuleBase_IWorkshop;
 
-/// the plane edge width
-#define SKETCH_WIDTH        "4"
-/// face of the square-face displayed for selection of general plane
-#define PLANE_SIZE          "200"
-
 /**
 * \class PartSet_PreviewPlanes
 * \ingroup Modules