]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#2205 Ability to customize the arrows and texts of dimensions: Location type is not...
authornds <nds@opencascade.com>
Wed, 4 Oct 2017 03:55:41 +0000 (06:55 +0300)
committernds <nds@opencascade.com>
Wed, 4 Oct 2017 03:55:41 +0000 (06:55 +0300)
src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
src/SketchPlugin/SketchPlugin_ConstraintDistanceHorizontal.cpp
src/SketchPlugin/SketchPlugin_ConstraintDistanceVertical.cpp
src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp

index 23bba812a64fff286e9fc83a028c1b1e4ab0e329..e1d15b68ce2099b623fed5f9aee8329237646884 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 #include <GeomDataAPI_Point2D.h>
 
@@ -68,6 +70,7 @@ void SketchPlugin_ConstraintAngle::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 void SketchPlugin_ConstraintAngle::colorConfigInfo(std::string& theSection, std::string& theName,
index 7532a3e0e1a666a9ebc8397dac76d8d0caf3371b..e75dcde94be98107862445248b2f20f5319ab821 100644 (file)
@@ -35,6 +35,8 @@
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
 #include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 #include <Config_PropManager.h>
 
@@ -59,6 +61,7 @@ void SketchPlugin_ConstraintDistance::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintDistance::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 void SketchPlugin_ConstraintDistance::colorConfigInfo(std::string& theSection, std::string& theName,
index c75e83bf570af3d1e3bf955d9b160993a8bffebe..355292413533f48d127d4443380c85af2188e92f 100644 (file)
@@ -33,6 +33,8 @@
 
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 const double tolerance = 1e-7;
 
@@ -52,6 +54,7 @@ void SketchPlugin_ConstraintDistanceHorizontal::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintDistanceHorizontal::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 //*************************************************************************************
index 845b3b1cc2175d0245911de3bbc373ceb460dd95..8823c3aa06bd25ae252a611e9de489f5d9b7658e 100644 (file)
@@ -33,6 +33,8 @@
 
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 const double tolerance = 1e-7;
 
@@ -52,6 +54,7 @@ void SketchPlugin_ConstraintDistanceVertical::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintDistanceVertical::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 //*************************************************************************************
index 6eda688a8da5422a87f9b4de2e07526ff0195c4e..70f00444110a9d53cb951d2032c02414060fcc5a 100644 (file)
@@ -29,6 +29,8 @@
 #include <ModelAPI_AttributeInteger.h>
 #include <ModelAPI_Data.h>
 #include <ModelAPI_Result.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 #include <GeomDataAPI_Point2D.h>
 
@@ -56,6 +58,7 @@ void SketchPlugin_ConstraintLength::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintLength::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 void SketchPlugin_ConstraintLength::colorConfigInfo(std::string& theSection, std::string& theName,
index bd5b0bd7db52cb2faa9065844102b8a8b8365ce5..0b34c183c507df854725bb23ec85dfaaca5ef30f 100644 (file)
@@ -29,6 +29,8 @@
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
 #include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 #include <GeomAPI_Pnt2d.h>
 #include <GeomAPI_Circ.h>
@@ -56,6 +58,7 @@ void SketchPlugin_ConstraintRadius::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintRadius::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 void SketchPlugin_ConstraintRadius::colorConfigInfo(std::string& theSection, std::string& theName,