Skip to content

Commit

Permalink
clear expression when setting constraint non-driving
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 11, 2016
1 parent f86a4e4 commit 5465bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Sketcher/App/SketchObject.cpp
Expand Up @@ -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<App::Expression>());
delete constNew;

Expand Down Expand Up @@ -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<App::Expression>());
delete constNew;

Expand Down

0 comments on commit 5465bc4

Please sign in to comment.