FreeCAD: master 21416961

Author Committer Branch Timestamp Parent
abdullah abdullah master 2015-06-25 13:58:43 master 3a69c926
Affected Issues  0002171: Several issues when trying to delete an element of a sketch
Changeset Sketch: Bug fix: On delete crash with unsuccesful solving


Fixes the one reported by JMG here (Thanks!!):

- The newly introduced redrawing policy requires that the solver geometry matches in number the sketchobject geometry.
- Most (all) problems with updateColor or getGeometry returning a null pointer are related to an out of sync between UI geometry and SketchObject geometry.

General solution:
- In other bugs, a missing "solve()" is the problem, once the solver and sketchobject geometries have the same number, an SketchObject::OnChanged triggers
a VPSketch::draw (via VPSketch::updateData) which updates the UI geometry to match SketchObject geometry and then the problem does not arise.

Particular solution:
- In this bug, the problem is not a missing solve, but the fact that the solving was not succesful and did not synchronize the geometries, however triggering a
draw() on unsuccessful solving, syncronizes the UI geometry with the SketchObject geometry and the crash is gone.
mod - src/Mod/Sketcher/Gui/ViewProviderSketch.cpp Diff File