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

@@ -111,7 +111,7 @@ void ViewProviderRobotObject::setDragger()
void ViewProviderRobotObject::resetDragger()
{
assert(pcDragger);
pcTcpRoot->removeAllChildren();
Gui::coinRemoveAllChildren(pcTcpRoot);
pcDragger = 0;
}
@@ -181,7 +181,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop)
QString fn = QString::fromUtf8(filename);
QFile file(fn);
SoInput in;
pcRobotRoot->removeAllChildren();
Gui::coinRemoveAllChildren(pcRobotRoot);
if (!fn.isEmpty() && file.open(QFile::ReadOnly)) {
QByteArray buffer = file.readAll();
in.setBuffer((void *)buffer.constData(), buffer.length());