Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintHorizontal.cpp
index 722ea659a0f96a54bae1f5e9d0fb01b0487e8b39..9fe7e5188793955e98975860a063f0acaf706abf 100644 (file)
@@ -23,7 +23,7 @@ SketchPlugin_ConstraintHorizontal::SketchPlugin_ConstraintHorizontal()
 
 void SketchPlugin_ConstraintHorizontal::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 void SketchPlugin_ConstraintHorizontal::execute()
@@ -36,7 +36,9 @@ AISObjectPtr SketchPlugin_ConstraintHorizontal::getAISObject(AISObjectPtr thePre
     return thePrevious;
 
   AISObjectPtr anAIS = thePrevious;
-  /// TODO: Horizontal constraint presentation should be put here
+  if (!anAIS) {
+    anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane());
+  }
   return anAIS;
 }