Gui: add coinRemoveAllChildren to work around Coin3D bug

See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
This commit is contained in:
Zheng, Lei
2019-05-31 06:28:00 +08:00
committed by wmayer
parent c744157e9a
commit c8891be856
36 changed files with 115 additions and 55 deletions

View File

@@ -135,7 +135,7 @@ void ViewProviderFemConstraintTransform::updateData(const App::Property* prop)
std::vector<Base::Vector3d>::const_iterator n = normals.begin();
// Points and Normals are always updated together
pShapeSep->removeAllChildren();
Gui::coinRemoveAllChildren(pShapeSep);
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end(); p++) {
SbVec3f base(p->x, p->y, p->z);
@@ -269,7 +269,7 @@ void ViewProviderFemConstraintTransform::updateData(const App::Property* prop)
} else if (transform_type == "Cylindrical") {
// Points and Normals are always updated together
pShapeSep->removeAllChildren();
Gui::coinRemoveAllChildren(pShapeSep);
const std::vector<Base::Vector3d>& points = pcConstraint->Points.getValues();
const std::vector<Base::Vector3d>& normals = pcConstraint->Normals.getValues();