X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintHorizontal.cpp;h=558b44a3ddaa4aa6eea1af177f350db1f23579c2;hb=b5893b0a30fac08134c24de4565cb513a43affa6;hp=175715d28afd30f5f4a3694d6aa942753a81895c;hpb=747b8fc4fc7746b3abe2f0b4aa5a583ae38aedcb;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp b/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp index 175715d28..558b44a3d 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp @@ -14,6 +14,7 @@ #include #include +//#include #include @@ -23,7 +24,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() @@ -35,11 +36,8 @@ AISObjectPtr SketchPlugin_ConstraintHorizontal::getAISObject(AISObjectPtr thePre if (!sketch()) return thePrevious; - AISObjectPtr anAIS = thePrevious; - if (!anAIS) { - anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane()); - } + AISObjectPtr anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane(), + thePrevious); return anAIS; } -