From 1afb1f4e9ab99eb85c18599e9ba6070b62e49e21 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 15 Mar 2017 11:52:05 +0300 Subject: [PATCH] Fix for registering of parameters in command line. --- src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp | 11 +++++++++++ src/PartSet/PartSet_Module.cpp | 10 ---------- src/PartSet/PartSet_Module.h | 3 --- src/PartSet/PartSet_PreviewPlanes.h | 5 ----- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp b/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp index 4c20ecd89..812f54ce6 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp @@ -11,6 +11,10 @@ #include #include +#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); diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 760234e1f..14f18c942 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -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) { diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index f5f897686..ed00ebef5 100755 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -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 diff --git a/src/PartSet/PartSet_PreviewPlanes.h b/src/PartSet/PartSet_PreviewPlanes.h index 955f5dcf2..db14f2729 100755 --- a/src/PartSet/PartSet_PreviewPlanes.h +++ b/src/PartSet/PartSet_PreviewPlanes.h @@ -15,11 +15,6 @@ 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 -- 2.39.2