From 9d0198bade639ebe3dd62f398c35f3f38c8fac30 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 25 Dec 2019 11:29:41 +0000 Subject: [PATCH] Easier control of zoom in 3D viewer. Go to 3 steps per doubling (instead of 2), and start at 2/3 instead of 1/2. --- 3d-viewer/3d_canvas/eda_3d_canvas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp index e5a293e857..c4de0e67c9 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp +++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp @@ -956,7 +956,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode ) m_settings.CameraGet().SetInterpolateMode( INTERPOLATION_BEZIER ); m_settings.CameraGet().SetT0_and_T1_current_T(); m_settings.CameraGet().Reset_T1(); - request_start_moving_camera( glm::min( glm::max( m_settings.CameraGet().ZoomGet(), 0.5f ), 1.125f ) ); + request_start_moving_camera( glm::min( glm::max( m_settings.CameraGet().ZoomGet(), 1/1.26f ), 1.26f ) ); return true; case WXK_END: @@ -974,7 +974,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode ) m_settings.CameraGet().SetInterpolateMode( INTERPOLATION_BEZIER ); m_settings.CameraGet().SetT0_and_T1_current_T(); - if( m_settings.CameraGet().Zoom_T1( 1.4f ) ) + if( m_settings.CameraGet().Zoom_T1( 1.26f ) ) // 3 steps per doubling request_start_moving_camera( 3.0f ); return true; @@ -983,7 +983,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode ) m_settings.CameraGet().SetInterpolateMode( INTERPOLATION_BEZIER ); m_settings.CameraGet().SetT0_and_T1_current_T(); - if( m_settings.CameraGet().Zoom_T1( 1/1.4f ) ) + if( m_settings.CameraGet().Zoom_T1( 1/1.26f ) ) // 3 steps per halving request_start_moving_camera( 3.0f ); return true;