Sketcher: refactor onDocumentRestored()

This commit is contained in:
Abdullah Tahiri
2020-12-09 16:49:35 +01:00
committed by abdullahtahiriyo
parent a3a9d29e38
commit 32d8992830

View File

@@ -7470,18 +7470,7 @@ void SketchObject::onUndoRedoFinished()
void SketchObject::onDocumentRestored()
{
try {
migrateSketch();
validateExternalLinks();
rebuildExternalGeometry();
Constraints.acceptGeometry(getCompleteGeometry());
// this may happen when saving a sketch directly in edit mode
// but never performed a recompute before
if (Shape.getValue().IsNull() && hasConflicts() == 0) {
if (this->solve(true) == 0)
Shape.setValue(solvedSketch.toShape());
}
restoreFinished();
Part::Part2DObject::onDocumentRestored();
}
catch (...) {