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