Correct searching of constraints needed to set two lines collinear
}
bool isNew = false;
- for (int i = 0; i < 4 && !isNew; ++i)
+ for (int i = 0; i < 4; ++i) {
if (aConstraintToApply[i] != myIsConstraintApplied[i])
isNew = true;
+ myIsConstraintApplied[i] = aConstraintToApply[i];
+ }
+
if (isNew) {
mySolverConstraint = createPointsOnLine(aPoints[0], aPoints[1], aLine);
if (myInSolver) {
myStorage->addConstraint(myBaseConstraint, mySolverConstraint);
myInSolver = true;
}
-
- for (int i = 0; i < 4; ++i)
- myIsConstraintApplied[i] = aConstraintToApply[i];
}
}