diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index b34ee7682b..a63abb399c 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -622,7 +622,10 @@ void NavigationStyle::reorientCamera(SoCamera * cam, const SbRotation & rot) // Set new orientation value by accumulating the new rotation. cam->orientation = rot * cam->orientation.getValue(); - + // Fix issue with near clipping in orthogonal view + if (cam->getTypeId().isDerivedFrom(SoOrthographicCamera::getClassTypeId())) { + cam->focalDistance = static_cast(cam)->height; + } // Reposition camera so we are still pointing at the same old focal point. cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); cam->position = focalpoint - cam->focalDistance.getValue() * direction;