+ fixes #0001060: Editing sketch crashes FreeCAD

This commit is contained in:
wmayer
2014-12-27 22:47:21 +01:00
parent e354a0394e
commit 6220246edb
6 changed files with 163 additions and 2 deletions

View File

@@ -3967,6 +3967,13 @@ bool ViewProviderSketch::setEdit(int ModNum)
return false;
}
Sketcher::SketchObject* sketch = getSketchObject();
if (!sketch->evaluateConstraints()) {
QMessageBox::critical(Gui::getMainWindow(), tr("Invalid sketch"),
tr("The sketch is invalid and cannot be edited.\nUse the sketch validation tool."));
return false;
}
// clear the selection (convenience)
Gui::Selection().clearSelection();