+ fixes #0001060: Editing sketch crashes FreeCAD
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user