Salome HOME
Unit tests fixes related to python swigged lists iteration
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintEqual.cpp
index efd034fea2ce18faa18d74b64d1790ef13b68e69..e63764802a3f0d65cb2f3f0d5e217eb9dbe27c79 100644 (file)
@@ -23,8 +23,8 @@ SketchPlugin_ConstraintEqual::SketchPlugin_ConstraintEqual()
 
 void SketchPlugin_ConstraintEqual::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 void SketchPlugin_ConstraintEqual::execute()
@@ -36,10 +36,8 @@ AISObjectPtr SketchPlugin_ConstraintEqual::getAISObject(AISObjectPtr thePrevious
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = thePrevious;
-  if (!anAIS) {
-    anAIS = SketcherPrs_Factory::equalConstraint(this, sketch()->coordinatePlane());
-  }
+  AISObjectPtr anAIS = SketcherPrs_Factory::equalConstraint(this, sketch()->coordinatePlane(),
+                                                            thePrevious);
   return anAIS;
 }