From 752c9e02e6aa8ced24e9b53097cb42540d5e6a08 Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 24 Dec 2015 18:24:36 +0300 Subject: [PATCH] Fix for issue #1174 --- .../SolveSpaceSolver/SolveSpaceSolver_Storage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp index 51699b90f..e2cd45ad5 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp @@ -391,6 +391,13 @@ void SolveSpaceSolver_Storage::replaceInConstraints( std::shared_ptr aWrapper = std::dynamic_pointer_cast(*aCIt); + if (theSource->id() == theDest->id()) { + // No need to update SolveSpace constraint if the entities are the same + aWrapper->changeConstraint() = getConstraint((Slvs_hConstraint)aWrapper->id()); + aWrapper->setEntities(aSubs); + continue; + } + // change constraint entities Slvs_Constraint aConstr = aWrapper->constraint(); if (aConstr.ptA == (Slvs_hEntity)theSource->id()) -- 2.39.2