]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_ConstraintDistanceVertical.cpp
Salome HOME
#2205 Ability to customize the arrows and texts of dimensions: Location type is not...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintDistanceVertical.cpp
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());
 }
 
 //*************************************************************************************