X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSketcherPrs%2FSketcherPrs_Perpendicular.cpp;h=1a801a165a058927ff107c3385a12d541b74e21f;hb=a0519cf58c58bbe2f8c3152689bea4cd1fa2a123;hp=acd166cb9343a2fa375c219f22e53c6f9605e4c8;hpb=50c00db30f94180aeccd1ae40c6d042e2f547f76;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp index acd166cb9..1a801a165 100644 --- a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp +++ b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp @@ -43,17 +43,18 @@ SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstr } bool SketcherPrs_Perpendicular::IsReadyToDisplay(ModelAPI_Feature* theConstraint, - const std::shared_ptr&/* thePlane*/) + const std::shared_ptr& thePlane) { bool aReadyToDisplay = false; - - ObjectPtr aObj1 = - SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A()); - ObjectPtr aObj2 = - SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B()); - - aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL && - SketcherPrs_Tools::getShape(aObj2).get() != NULL; + if (thePlane) { + ObjectPtr aObj1 = + SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A()); + ObjectPtr aObj2 = + SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B()); + + aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL && + SketcherPrs_Tools::getShape(aObj2).get() != NULL; + } return aReadyToDisplay; }