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:
@@ -39,6 +39,7 @@
|
||||
#include "DlgSettingsColorGradientImp.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MDIView.h"
|
||||
#include "ViewProvider.h"
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
@@ -83,7 +84,7 @@ void SoFCColorGradient::finish()
|
||||
|
||||
void SoFCColorGradient::setMarkerLabel( const SoMFString& label )
|
||||
{
|
||||
labels->removeAllChildren();
|
||||
coinRemoveAllChildren(labels);
|
||||
|
||||
float fH=8.0f;
|
||||
int num = label.getNum();
|
||||
@@ -294,7 +295,7 @@ void SoFCColorGradient::rebuildGradient()
|
||||
|
||||
// first clear the children
|
||||
if ( getNumChildren() > 0 )
|
||||
removeAllChildren();
|
||||
coinRemoveAllChildren(this);
|
||||
addChild(ttype);
|
||||
addChild(labels);
|
||||
addChild(coords);
|
||||
|
||||
Reference in New Issue
Block a user