Fix crash from unviewed parametrized datum plane

This commit is contained in:
Enmar Abrams 2016-04-27 00:17:48 -04:00 committed by wmayer
parent 76ce101a9b
commit c12c4368cc

View File

@ -349,15 +349,19 @@ SbBox3f ViewProviderDatum::getRelevantBoundBox () const {
}
}
Gui::View3DInventorViewer* viewer = static_cast<Gui::View3DInventor*>(this->getActiveView())->getViewer();
Gui::View3DInventor* view = dynamic_cast<Gui::View3DInventor*>(this->getActiveView());
if(view){
Gui::View3DInventorViewer* viewer = view->getViewer();
SoGetBoundingBoxAction bboxAction(viewer->getSoRenderManager()->getViewportRegion());
SbBox3f bbox = getRelevantBoundBox (bboxAction, objs);
if ( bbox.getVolume () < Precision::Confusion() ) {
bbox.extendBy ( defaultBoundBox () );
}
return bbox;
} else {
return defaultBoundBox();
}
}
SbBox3f ViewProviderDatum::getRelevantBoundBox (