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.
This commit is contained in:
Abdullah Tahiri
2020-12-16 19:30:48 +01:00
parent b7f9cbaf8b
commit ccd8551f2b

View File

@@ -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));