From 9c1686eab010a8f55463cdf6e2c52ea6c931947e Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 26 May 2015 18:38:50 +0300 Subject: [PATCH] Hang up on constraining already fixed object --- src/SketchSolver/SketchSolver_Constraint.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SketchSolver/SketchSolver_Constraint.cpp b/src/SketchSolver/SketchSolver_Constraint.cpp index d5c3bbb5a..6a7ecdb09 100644 --- a/src/SketchSolver/SketchSolver_Constraint.cpp +++ b/src/SketchSolver/SketchSolver_Constraint.cpp @@ -277,6 +277,11 @@ void SketchSolver_Constraint::cleanRemovedEntities() std::map::iterator aTmpIter = aValIt++; myValueMap.erase(aTmpIter); } + for (size_t i = 0; i < mySlvsConstraints.size(); i++) + if (aRemovedConstraints.find(mySlvsConstraints[i]) != aRemovedConstraints.end()) { + mySlvsConstraints.erase(mySlvsConstraints.begin() + i); + i--; + } } void SketchSolver_Constraint::getAttributes( -- 2.39.2