Skip to content

Commit

Permalink
[Sketcher] Fix FreeCAD#14736
Browse files Browse the repository at this point in the history
Recompute even if the addition of new elements and autoconstraints failed
partially.
  • Loading branch information
AjinkyaDahale committed Aug 21, 2024
1 parent 503b324 commit 3687c26
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,17 @@ class DrawSketchDefaultHandler: public DrawSketchHandler,

createAutoConstraints();
}
}
catch (const Base::RuntimeError& e) {
// RuntimeError exceptions inside of the block above must provide a translatable
// message. It is reported both to developer (report view) and user (notifications
// area).
Base::Console().Error(e.what());
}

// Keep the recompute separate so that everything is drawn even if execution fails
// partially
try {
tryAutoRecomputeIfNotSolve(sketchgui->getSketchObject());
}
catch (const Base::RuntimeError& e) {
Expand All @@ -506,7 +516,6 @@ class DrawSketchDefaultHandler: public DrawSketchHandler,
// area).
Base::Console().Error(e.what());
}

return handleContinuousMode();
}
return false;
Expand Down

0 comments on commit 3687c26

Please sign in to comment.