[Bugfix]Sketcher/Point-on-object: do not substitute constraint if conditions are not OK

This commit is contained in:
0penBrain
2022-09-12 11:59:34 +02:00
committed by Uwe
parent f970a321b2
commit f9fb72fdc8

View File

@@ -2649,15 +2649,10 @@ void CmdSketcherConstrainPointOnObject::applyConstraint(std::vector<SelIdPair> &
return;
}
if(substituteConstraintCombinations(Obj, GeoIdVt, PosIdVt, GeoIdCrv)) {
commitCommand();
tryAutoRecompute(Obj);
return;
}
if (allOK) {
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",
GeoIdVt, static_cast<int>(PosIdVt), GeoIdCrv);
if (!substituteConstraintCombinations(Obj, GeoIdVt, PosIdVt, GeoIdCrv))
Gui::cmdAppObjectArgs( sketchgui->getObject(), "addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",
GeoIdVt, static_cast<int>(PosIdVt), GeoIdCrv);
commitCommand();
tryAutoRecompute(Obj);