3D viewer: fix a minor problem: to many rotations when typing
Shift+z or Shift+y more than once.
From master, commit 00d9e77e
This commit is contained in:
parent
e9b059ee94
commit
9c2bb85858
|
@ -1085,7 +1085,10 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
|
|||
m_settings.CameraGet().SetT0_and_T1_current_T();
|
||||
m_settings.CameraGet().Reset_T1();
|
||||
m_settings.CameraGet().RotateX_T1( glm::radians( -90.0f ) );
|
||||
m_settings.CameraGet().RotateZ_T1( glm::radians( -180.0f ) );
|
||||
// The rotation angle should be 180.
|
||||
// We use 179.999 (180 - epsilon) to avoid a full 360 deg rotation when
|
||||
// using 180 deg if the previous rotated position was already 180 deg
|
||||
m_settings.CameraGet().RotateZ_T1( glm::radians( -179.999f ) );
|
||||
request_start_moving_camera();
|
||||
return true;
|
||||
|
||||
|
@ -1101,7 +1104,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();
|
||||
m_settings.CameraGet().RotateY_T1( glm::radians( 180.0f ) );
|
||||
m_settings.CameraGet().RotateY_T1( glm::radians( 179.999f ) ); // Rotation = 180-epsilon
|
||||
request_start_moving_camera(
|
||||
glm::min( glm::max( m_settings.CameraGet().ZoomGet(), 0.5f ), 1.125f ) );
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue