mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-11 22:38:58 +08:00
Added limit to zoom in
This commit is contained in:
parent
aaaffd7f90
commit
b47355a325
@ -5951,6 +5951,9 @@ void GLCanvas3D::set_camera_zoom(float zoom)
|
||||
if (zoom_min > 0.0f)
|
||||
zoom = std::max(zoom, zoom_min * 0.7f);
|
||||
|
||||
// Don't allow to zoom too close to the scene.
|
||||
zoom = std::min(zoom, 100.0f);
|
||||
|
||||
m_camera.zoom = zoom;
|
||||
viewport_changed();
|
||||
_refresh_if_shown_on_screen();
|
||||
|
Loading…
x
Reference in New Issue
Block a user