+ fixes #0002268: Segmentation Fault when using sketcher

This commit is contained in:
wmayer
2015-09-17 13:31:10 +02:00
parent 22b7fb660c
commit ed2eeffd67
2 changed files with 45 additions and 12 deletions

View File

@@ -60,6 +60,23 @@ SO_NODE_SOURCE(SoAutoZoomTranslation);
void SoAutoZoomTranslation::initClass()
{
SO_NODE_INIT_CLASS(SoAutoZoomTranslation, SoTransformation, "AutoZoom");
// Enable elements for SoGetMatrixAction (#0002268)
// SoCamera::initClass() enables the SoViewVolumeElement for
// * SoGLRenderAction
// * SoGetBoundingBoxAction
// * SoRayPickAction
// * SoCallbackAction
// * SoGetPrimitiveCountAction
// The element SoViewportRegionElement is enabled by the
// above listed actions.
// Addionally, SoViewVolumeElement is enabled for
// * SoAudioRenderAction
// * SoHandleEventAction
// And SoViewportRegionElement is enabled for
// * SoHandleEventAction
// * SoGetMatrixAction
SO_ENABLE(SoGetMatrixAction, SoViewVolumeElement);
}
float SoAutoZoomTranslation::getScaleFactor(SoAction* action) const
@@ -142,4 +159,4 @@ void SoAutoZoomTranslation::getPrimitiveCount(SoGetPrimitiveCountAction * action
{
//Base::Console().Log("getPrimitiveCount\n");
SoAutoZoomTranslation::doAction((SoAction*)action);
}
}