Skip to content

Commit

Permalink
Sketcher: refactor onDocumentRestored()
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahtahiriyo committed Dec 10, 2020
1 parent f33aab5 commit 40c0f0a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Mod/Sketcher/App/SketchObject.cpp
Expand Up @@ -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 (...) {
Expand Down

0 comments on commit 40c0f0a

Please sign in to comment.