Improved SketchObject error reporting

This commit is contained in:
jrheinlaender
2013-09-12 16:18:08 +02:00
committed by Stefan Tröger
parent 0ab6a77442
commit 37a8c02bc6
3 changed files with 7 additions and 0 deletions

View File

@@ -268,6 +268,8 @@ int SketchObject::solve(bool updateGeoAfterSolving/*=true*/)
int SketchObject::setDatum(int ConstrId, double Datum)
{
// set the changed value for the constraint
if (this->Constraints.hasInvalidGeometry())
return -6;
const std::vector<Constraint *> &vals = this->Constraints.getValues();
if (ConstrId < 0 || ConstrId >= int(vals.size()))
return -1;