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 35986de79d752d0235525996090ece0946c1d1e1..b1cc7010d9ad4eaafaafba89459f0dbe7205cc5e 100644 (file)
@@ -30,6 +30,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>
 
@@ -57,7 +59,7 @@ void SketchPlugin_ConstraintLength::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintLength::LOCATION_TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
-  data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
 }
 
 void SketchPlugin_ConstraintLength::colorConfigInfo(std::string& theSection, std::string& theName,