From 97effe4017c673bc4c7da28558b196bd0b374725 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Fri, 27 Apr 2018 20:09:55 +0200 Subject: [PATCH] Sketcher: fix failure to notify solver issues, like redundancies, when using setUpSketch in SketchObject --- src/Mod/Sketcher/App/SketchObject.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 2787c7819b..637a65bfac 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -475,8 +475,19 @@ int SketchObject::toggleVirtualSpace(int ConstrId) int SketchObject::setUpSketch() { - return solvedSketch.setUpSketch(getCompleteGeometry(), Constraints.getValues(), - getExternalGeometryCount()); + lastDoF = solvedSketch.setUpSketch(getCompleteGeometry(), Constraints.getValues(), + getExternalGeometryCount()); + + lastHasConflict = solvedSketch.hasConflicts(); + lastHasRedundancies = solvedSketch.hasRedundancies(); + lastConflicting=solvedSketch.getConflicting(); + lastRedundant=solvedSketch.getRedundant(); + + if(lastHasRedundancies || lastDoF < 0 || lastHasConflict) + Constraints.touch(); + + return lastDoF; + } int SketchObject::movePoint(int GeoId, PointPos PosId, const Base::Vector3d& toPoint, bool relative, bool updateGeoBeforeMoving)