Fix crash from unviewed parametrized datum plane
This commit is contained in:
parent
76ce101a9b
commit
c12c4368cc
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue
Block a user