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:
@@ -119,12 +119,12 @@ void ViewProviderTransformed::unsetEdit(int ModNum)
|
||||
while (pcRejectedRoot->getNumChildren() > 7) {
|
||||
SoSeparator* sep = static_cast<SoSeparator*>(pcRejectedRoot->getChild(7));
|
||||
SoMultipleCopy* rejectedTrfms = static_cast<SoMultipleCopy*>(sep->getChild(2));
|
||||
rejectedTrfms ->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(rejectedTrfms);
|
||||
sep->removeChild(1);
|
||||
sep->removeChild(0);
|
||||
pcRejectedRoot ->removeChild(7);
|
||||
}
|
||||
pcRejectedRoot->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(pcRejectedRoot);
|
||||
|
||||
pcRoot->removeChild(pcRejectedRoot);
|
||||
|
||||
@@ -168,7 +168,7 @@ void ViewProviderTransformed::recomputeFeature(void)
|
||||
while (pcRejectedRoot->getNumChildren() > 7) {
|
||||
SoSeparator* sep = static_cast<SoSeparator*>(pcRejectedRoot->getChild(7));
|
||||
SoMultipleCopy* rejectedTrfms = static_cast<SoMultipleCopy*>(sep->getChild(2));
|
||||
rejectedTrfms ->removeAllChildren();
|
||||
Gui::coinRemoveAllChildren(rejectedTrfms);
|
||||
sep->removeChild(1);
|
||||
sep->removeChild(0);
|
||||
pcRejectedRoot ->removeChild(7);
|
||||
|
||||
Reference in New Issue
Block a user