Sketcher Bug fix: Solver information update on over-constrained situation

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

Why?
if lastDoF<0, then an over-constrained situation has ensued and geometry is not to be updated, as geometry can not follow the constraints.
However, solver information needs to be updated.

Solution:
Just trigger a constraint change so that signaling is sent to ViewProviderSketch via boost and the solver information updated, using
Constraints.touch().
This commit is contained in:
Abdullah Tahiri 2016-01-08 16:05:41 +01:00 committed by wmayer
parent 3aa44e6b0c
commit 81f216f9e3

View File

@ -208,10 +208,16 @@ int SketchObject::solve(bool updateGeoAfterSolving/*=true*/)
lastHasConflict = solvedSketch.hasConflicts();
int err=0;
if (lastDoF < 0) // over-constrained sketch
if (lastDoF < 0) { // over-constrained sketch
err = -3;
else if (lastHasConflict) // conflicting constraints
// if lastDoF<0, then an over-constrained situation has ensued.
// Geometry is not to be updated, as geometry can not follow the constraints.
// However, solver information must be updated.
this->Constraints.touch();
}
else if (lastHasConflict) { // conflicting constraints
err = -3;
}
else {
lastSolverStatus=solvedSketch.solve();
if (lastSolverStatus != 0){ // solving