Sketcher: Fix for failure of constraint substitution

====================================================

fixes #4105

When a constraint substitution is present, a solve must precede any call to the redundant removal to update the solver information.
This commit is contained in:
Abdullah Tahiri
2020-05-28 19:34:15 +02:00
committed by abdullahtahiriyo
parent 0b912f7c8b
commit 08854bcc71

View File

@@ -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");
@@ -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");