fixes #10063: Part_SectionCut does not work if the view is in perspective

This commit is contained in:
wmayer
2023-08-09 18:42:55 +02:00
committed by wwmayer
parent a12a44823d
commit a8a730bf6d

View File

@@ -1962,8 +1962,9 @@ SbBox3f SectionCut::getViewBoundingBox()
}
Gui::View3DInventorViewer* viewer = view->getViewer();
SoCamera* camera = viewer->getSoRenderManager()->getCamera();
if (!camera || !camera->isOfType(SoOrthographicCamera::getClassTypeId()))
if (!camera) {
return Box; // return an empty box
}
// get scene bounding box
SoGetBoundingBoxAction action(viewer->getSoRenderManager()->getViewportRegion());
action.apply(viewer->getSceneGraph());