Sketcher: Bug fix: Unexpected crashes during certain operations

===============================================================

The sketcher crashed for example during effecting a fillet operation.

Cause:
The ElementsWidget/ConstraintWidget was being updated as a consequence of adding/removing geometry/constraints, and it was effecting
a selection after the update, in cases where the geometry in the screen was not being redraw (because the sketchobject was still unsolved), therefore
trying to select an element that according to ViewProvider did not exist (as it is created during redraw).

Solution:
Widgets update when their properties changes, provided that a redraw is effected (which actually also saves some (negligible) time, as they are only updated when they should).
This commit is contained in:
Abdullah Tahiri 2015-06-19 13:56:14 +02:00 committed by wmayer
parent 93c836fdcf
commit 480d23f8e1

View File

@ -4094,16 +4094,18 @@ void ViewProviderSketch::updateData(const App::Property *prop)
getSketchObject()->getSolvedSketch().getGeometrySize()) {
UpdateSolverInformation(); // just update the solver window with the last SketchObject solving information
draw(false);
if (edit && &(getSketchObject()->Constraints)) {
// send the signal for the TaskDlg.
signalConstraintsChanged();
}
if (edit && &(getSketchObject()->Geometry)) {
// send the signal for the TaskDlg.
signalElementsChanged();
}
}
}
if (edit && &(getSketchObject()->Constraints)) {
// send the signal for the TaskDlg.
signalConstraintsChanged();
}
if (edit && &(getSketchObject()->Geometry)) {
// send the signal for the TaskDlg.
signalElementsChanged();
}
}
void ViewProviderSketch::onChanged(const App::Property *prop)