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:
@@ -3528,7 +3528,7 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
|
||||
// information layer
|
||||
if(rebuildinformationlayer) {
|
||||
// every time we start with empty information layer
|
||||
edit->infoGroup->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(edit->infoGroup);
|
||||
}
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
@@ -4282,7 +4282,7 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
|
||||
if (ShowGrid.getValue())
|
||||
createGrid();
|
||||
else
|
||||
GridRoot->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(GridRoot);
|
||||
|
||||
edit->RootCrossCoordinate->point.set1Value(0,SbVec3f(-dMagF, 0.0f, zCross));
|
||||
edit->RootCrossCoordinate->point.set1Value(1,SbVec3f(dMagF, 0.0f, zCross));
|
||||
@@ -5297,7 +5297,7 @@ void ViewProviderSketch::rebuildConstraintsVisual(void)
|
||||
{
|
||||
const std::vector<Sketcher::Constraint *> &constrlist = getSketchObject()->Constraints.getValues();
|
||||
// clean up
|
||||
edit->constrGroup->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(edit->constrGroup);
|
||||
edit->vConstrType.clear();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
@@ -6056,7 +6056,7 @@ void ViewProviderSketch::unsetEdit(int ModNum)
|
||||
if (edit->sketchHandler)
|
||||
deactivateHandler();
|
||||
|
||||
edit->EditRoot->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(edit->EditRoot);
|
||||
pcRoot->removeChild(edit->EditRoot);
|
||||
|
||||
//visibility autoation
|
||||
|
||||
Reference in New Issue
Block a user