Skip to content

Commit

Permalink
Add camera sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever committed Aug 3, 2024
1 parent 83c50b2 commit 8eb69b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/slic3r/GUI/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ double Camera::calc_zoom_to_volumes_factor(const GLVolumePtrs& volumes, Vec3d& c

void Camera::set_distance(double distance)
{
if(distance < EPSILON || distance > 1.0e6)
return;

if (m_distance != distance) {
m_view_matrix.translate((distance - m_distance) * get_dir_forward());
m_distance = distance;
Expand Down

0 comments on commit 8eb69b0

Please sign in to comment.