From: nds Date: Fri, 3 Jun 2016 06:53:54 +0000 (+0300) Subject: Correction to do not show DOF message until plane of the sketch is not selected. X-Git-Tag: V_2.4.0~145 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d1da0efa094e2cbe901556b48019abf00ad7efe5;p=modules%2Fshaper.git Correction to do not show DOF message until plane of the sketch is not selected. --- diff --git a/src/SketchSolver/SketchSolver_Manager.cpp b/src/SketchSolver/SketchSolver_Manager.cpp index 7f4c1e576..350ef59ab 100644 --- a/src/SketchSolver/SketchSolver_Manager.cpp +++ b/src/SketchSolver/SketchSolver_Manager.cpp @@ -491,7 +491,15 @@ void SketchSolver_Manager::degreesOfFreedom() std::list::const_iterator aGroupIt = myGroups.begin(); for (; aGroupIt != myGroups.end(); ++aGroupIt) { CompositeFeaturePtr aSketch = (*aGroupIt)->getWorkplane(); - if (!aSketch->data()->isValid()) { + bool isSketchValid = aSketch->data() && aSketch->data()->isValid(); + + if (isSketchValid) { + std::shared_ptr aNormal = + std::dynamic_pointer_cast(aSketch->data()->attribute(SketchPlugin_Sketch::NORM_ID())); + isSketchValid = aNormal && aNormal->isInitialized(); + } + + if (!isSketchValid) { myDoF.erase(aSketch); continue; }