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 c873fd7 commit c4f633e
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 c4f633e

Please sign in to comment.