From d1da0efa094e2cbe901556b48019abf00ad7efe5 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 3 Jun 2016 09:53:54 +0300 Subject: [PATCH] Correction to do not show DOF message until plane of the sketch is not selected. --- src/SketchSolver/SketchSolver_Manager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; } -- 2.39.2