X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_HVDirection.cpp;h=336f298b28b7305853dd04d79779435c143da702;hb=8038897b81335a9ec1ff08522ff652299cd2ff3f;hp=2f4ca10a3ccf8564fbb7d05b471fffc3c6559a29;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_HVDirection.cpp b/src/SketcherPrs/SketcherPrs_HVDirection.cpp index 2f4ca10a3..336f298b2 100644 --- a/src/SketcherPrs/SketcherPrs_HVDirection.cpp +++ b/src/SketcherPrs/SketcherPrs_HVDirection.cpp @@ -39,19 +39,20 @@ SketcherPrs_HVDirection::SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint } bool SketcherPrs_HVDirection::IsReadyToDisplay(ModelAPI_Feature* theConstraint, - const std::shared_ptr&/* thePlane*/) + const std::shared_ptr& thePlane) { bool aReadyToDisplay = false; - ObjectPtr aObj = - SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A()); - - aReadyToDisplay = SketcherPrs_Tools::getShape(aObj).get() != NULL; + if (thePlane.get()) { + ObjectPtr aObj = + SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A()); + aReadyToDisplay = SketcherPrs_Tools::getShape(aObj).get() != NULL; + } return aReadyToDisplay; } bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep, bool withColor) const { - if (!IsReadyToDisplay(myConstraint, myPlane)) + if (!IsReadyToDisplay(myConstraint, plane())) return false; // Set point of the symbol