diff --git a/src/slic3r/GUI/Camera.cpp b/src/slic3r/GUI/Camera.cpp index 76b59ef5b..b39df1ef4 100644 --- a/src/slic3r/GUI/Camera.cpp +++ b/src/slic3r/GUI/Camera.cpp @@ -523,7 +523,7 @@ std::pair Camera::calc_tight_frustrum_zs_around(const BoundingBo { std::pair ret; auto& [near_z, far_z] = ret; - + set_distance(DefaultDistance); // box in eye space const BoundingBoxf3 eye_box = box.transformed(m_view_matrix); near_z = -eye_box.max(2); @@ -547,15 +547,6 @@ std::pair Camera::calc_tight_frustrum_zs_around(const BoundingBo near_z += delta; far_z += delta; } -// The following is commented out because it causes flickering of the 3D scene GUI -// when the bounding box of the scene gets large enough -// We need to introduce some smarter code to move the camera back and forth in such case -// else if (near_z > 2.0 * FrustrumMinNearZ && m_distance > DefaultDistance) { -// float delta = m_distance - DefaultDistance; -// set_distance(DefaultDistance); -// near_z -= delta; -// far_z -= delta; -// } return ret; }