Salome HOME
#2205 Ability to customize the arrows and texts of dimensions: location type is not...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintRadius.cpp
index b38de08ee224a336d19de69ab99c5ef4475535f1..08b8b9be730c6e558b14537f6c8aba292ebeeca3 100644 (file)
@@ -30,6 +30,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>
@@ -57,7 +59,7 @@ void SketchPlugin_ConstraintRadius::initAttributes()
 
   data()->addAttribute(SketchPlugin_ConstraintRadius::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_ConstraintRadius::colorConfigInfo(std::string& theSection, std::string& theName,