From ccd8551f2babd06bb958c7558d665d0f2f517b9a Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Wed, 16 Dec 2020 19:30:48 +0100 Subject: [PATCH] Sketch: Fix exception on redraw =============================== Fixes: https://forum.freecadweb.org/viewtopic.php?p=458293#p458293 Rationale: In order to fix B-Spline pole dragging, the order was inverted. This fixed the B-Spline pole dragging issue, but introduced a draw before solve approach that is not consistent with the rest of the Sketcher. In my parallel development I had already identified this inconsistency, switched the order, and provided a new mechanism to fix the issue with the B-Spline pole dragging. This will be merged as part of another PR. In the meantime, this PR restores the intended behaviour, and let us identify if the particular reported exception also happens in other situations. --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index b62fd15bc6..9f378b3247 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -6106,9 +6106,9 @@ bool ViewProviderSketch::setEdit(int ModNum) // is loaded into the solver, which ensures that any prospective draw using temporal // geometry (draw with first parameter true) has the right ViewProvider geometry extensions // set - This fixes Weight constraint dragging on a just opened sketch. - draw(false,true); getSketchObject()->solve(false); UpdateSolverInformation(); + draw(false,true); connectUndoDocument = getDocument() ->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, bp::_1));