From f9530d0b3f2dffea1ec6a1b9a65daa296500def0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 19 Nov 2023 11:11:12 +0000 Subject: [PATCH] Remove "Reset View", which does the same as "Home View". Fixes https://gitlab.com/kicad/code/kicad/-/issues/16115 --- 3d-viewer/3d_canvas/eda_3d_canvas.cpp | 7 ------- 3d-viewer/3d_enums.h | 1 - 3d-viewer/3d_viewer/tools/eda_3d_actions.cpp | 9 --------- 3d-viewer/3d_viewer/tools/eda_3d_actions.h | 1 - 3d-viewer/3d_viewer/tools/eda_3d_controller.cpp | 1 - 5 files changed, 19 deletions(-) diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp index 4aab9ef18f..848a6931a4 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp +++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp @@ -982,13 +982,6 @@ bool EDA_3D_CANVAS::SetView3D( VIEW3D_TYPE aRequestedView ) return true; - case VIEW3D_TYPE::VIEW3D_RESET: - m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER ); - m_camera.SetT0_and_T1_current_T(); - m_camera.Reset_T1(); - request_start_moving_camera( glm::min( glm::max( m_camera.GetZoom(), 0.5f ), 1.125f ) ); - return true; - case VIEW3D_TYPE::VIEW3D_RIGHT: m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER ); m_camera.SetT0_and_T1_current_T(); diff --git a/3d-viewer/3d_enums.h b/3d-viewer/3d_enums.h index 9dee2448fe..53b460f394 100644 --- a/3d-viewer/3d_enums.h +++ b/3d-viewer/3d_enums.h @@ -83,7 +83,6 @@ enum class VIEW3D_TYPE VIEW3D_RIGHT, VIEW3D_FRONT, VIEW3D_BACK, - VIEW3D_RESET, VIEW3D_FLIP, // Movement commands diff --git a/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp b/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp index 14499778a8..827d3b4e3e 100644 --- a/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp @@ -152,15 +152,6 @@ TOOL_ACTION EDA_3D_ACTIONS::homeView( TOOL_ACTION_ARGS() .Flags( AF_NONE ) .Parameter( VIEW3D_TYPE::VIEW3D_FIT_SCREEN ) ); -TOOL_ACTION EDA_3D_ACTIONS::resetView( TOOL_ACTION_ARGS() - .Name( "3DViewer.Control.resetView" ) - .Scope( AS_ACTIVE ) - .DefaultHotkey( 'R' ) - .FriendlyName( _( "Reset View" ) ) - .Tooltip( _( "Reset view" ) ) - .Flags( AF_NONE ) - .Parameter( VIEW3D_TYPE::VIEW3D_RESET ) ); - TOOL_ACTION EDA_3D_ACTIONS::flipView( TOOL_ACTION_ARGS() .Name( "3DViewer.Control.flipView" ) .Scope( AS_ACTIVE ) diff --git a/3d-viewer/3d_viewer/tools/eda_3d_actions.h b/3d-viewer/3d_viewer/tools/eda_3d_actions.h index 8a6d767c7e..9476eb8263 100644 --- a/3d-viewer/3d_viewer/tools/eda_3d_actions.h +++ b/3d-viewer/3d_viewer/tools/eda_3d_actions.h @@ -54,7 +54,6 @@ public: static TOOL_ACTION moveUp; static TOOL_ACTION moveDown; static TOOL_ACTION homeView; - static TOOL_ACTION resetView; static TOOL_ACTION flipView; static TOOL_ACTION toggleOrtho; diff --git a/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp b/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp index 07f6f96eca..d58564bb11 100644 --- a/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp @@ -346,7 +346,6 @@ void EDA_3D_CONTROLLER::setTransitions() Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::viewBack.MakeEvent() ); Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::pivotCenter.MakeEvent() ); Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::homeView.MakeEvent() ); - Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::resetView.MakeEvent() ); Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::flipView.MakeEvent() ); Go( &EDA_3D_CONTROLLER::RotateView, EDA_3D_ACTIONS::rotateXCW.MakeEvent() ); Go( &EDA_3D_CONTROLLER::RotateView, EDA_3D_ACTIONS::rotateXCCW.MakeEvent() );