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:
@@ -478,11 +478,11 @@ void MeshFillHole::startEditing(MeshGui::ViewProviderMesh* vp)
|
||||
myConnection = App::GetApplication().signalChangedObject.connect(
|
||||
boost::bind(&MeshFillHole::slotChangedObject, this, _1, _2));
|
||||
|
||||
myBoundariesRoot->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(myBoundariesRoot);
|
||||
myBoundariesRoot->addChild(viewer->getHeadlight());
|
||||
myBoundariesRoot->addChild(viewer->getSoRenderManager()->getCamera());
|
||||
myBoundariesRoot->addChild(myBoundariesGroup);
|
||||
myBoundaryRoot->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(myBoundaryRoot);
|
||||
myBoundaryRoot->addChild(viewer->getHeadlight());
|
||||
myBoundaryRoot->addChild(viewer->getSoRenderManager()->getCamera());
|
||||
createPolygons();
|
||||
@@ -541,7 +541,7 @@ void MeshFillHole::closeBridge()
|
||||
void MeshFillHole::slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop)
|
||||
{
|
||||
if (&Obj == myMesh && strcmp(Prop.getName(),"Mesh") == 0) {
|
||||
myBoundariesGroup->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(myBoundariesGroup);
|
||||
myVertex->point.setNum(0);
|
||||
myNumPoints = 0;
|
||||
myPolygon.clear();
|
||||
|
||||
Reference in New Issue
Block a user