Salome HOME
empty AIS presentation should not be visualized in the viewer. It is caused by OCCT...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintPerpendicular.cpp
index eb9ec92f5866d8ba552b5e798bfcfd88bfaf8ed6..c7e327fa13d481d1da4baf6cbb702f0b683601e4 100644 (file)
@@ -41,10 +41,8 @@ AISObjectPtr SketchPlugin_ConstraintPerpendicular::getAISObject(AISObjectPtr the
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = thePrevious;
-  if (!anAIS) {
-    anAIS = SketcherPrs_Factory::perpendicularConstraint(this, sketch()->coordinatePlane());
-  }
+  AISObjectPtr anAIS = SketcherPrs_Factory::perpendicularConstraint(this, sketch()->coordinatePlane(),
+                                                                    thePrevious);
   return anAIS;
 }