diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 95af4568d8ef..baca3f1cd5cf 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -310,7 +310,7 @@ int SketchObject::setDriving(int ConstrId, bool isdriving) constNew->isDriving = isdriving; newVals[ConstrId] = constNew; this->Constraints.setValues(newVals); - if (isdriving) + if (!isdriving) setExpression(Constraints.createPath(ConstrId), boost::shared_ptr()); delete constNew; @@ -368,7 +368,7 @@ int SketchObject::toggleDriving(int ConstrId) constNew->isDriving = !constNew->isDriving; newVals[ConstrId] = constNew; this->Constraints.setValues(newVals); - if (constNew->isDriving) + if (!constNew->isDriving) setExpression(Constraints.createPath(ConstrId), boost::shared_ptr()); delete constNew;