Skip to content

Commit

Permalink
Sketcher: Fix for failure of constraint substitution
Browse files Browse the repository at this point in the history
====================================================

fixes #4105

When a constraint substitution is present, a solve must precede any call to the redundant removal to update the solver information.
  • Loading branch information
abdullahtahiriyo committed May 29, 2020
1 parent 0b912f7 commit 08854bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Mod/Sketcher/Gui/CommandConstraints.cpp
Expand Up @@ -2237,6 +2237,7 @@ void CmdSketcherConstrainCoincident::activated(int iMsg)
doEndpointTangency(Obj, selection[0], GeoId1, GeoId2, PosId1, PosId2);

commitCommand();
Obj->solve(); // The substitution requires a solve() so that the autoremove redundants works when Autorecompute not active.
tryAutoRecomputeIfNotSolve(Obj);

ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General");
Expand Down Expand Up @@ -4432,6 +4433,7 @@ void CmdSketcherConstrainTangent::activated(int iMsg)
Gui::cmdAppObjectArgs(Obj, "delConstraintOnPoint(%i,%i)", first, firstpos);

commitCommand();
Obj->solve(); // The substitution requires a solve() so that the autoremove redundants works when Autorecompute not active.
tryAutoRecomputeIfNotSolve(Obj);

ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General");
Expand Down

0 comments on commit 08854bc

Please sign in to comment.