From f175052b8079da90b68d1c8667e6d3fdf06548f4 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 17 Aug 2015 15:40:20 +0300 Subject: [PATCH] Avoid removing distance entity from list of SolveSpace entities (issue #848) --- src/SketchSolver/SketchSolver_Storage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SketchSolver/SketchSolver_Storage.cpp b/src/SketchSolver/SketchSolver_Storage.cpp index 2f2700fd2..a716b6859 100644 --- a/src/SketchSolver/SketchSolver_Storage.cpp +++ b/src/SketchSolver/SketchSolver_Storage.cpp @@ -215,8 +215,10 @@ void SketchSolver_Storage::removeUnusedEntities() int aPos = Search(aSubs[i], myEntities); if (aPos >= 0 && aPos < (int)myEntities.size()) { for (int j = 0; j < 4; j++) - if (myEntities[aPos].point[j] != 0) + if (myEntities[aPos].point[j] != SLVS_E_UNKNOWN) anUnusedEntities.erase(myEntities[aPos].point[j]); + if (myEntities[aPos].distance != SLVS_E_UNKNOWN) + anUnusedEntities.erase(myEntities[aPos].distance); } } } -- 2.39.2