diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp index 6e430e859a..31a1e1db2f 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp +++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp @@ -872,36 +872,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode ) return true; - case '+': - case '-': - break; - - case 't': - case 'T': - m_settings.SetFlag( FL_MODULE_ATTRIBUTES_NORMAL, - !m_settings.GetFlag( FL_MODULE_ATTRIBUTES_NORMAL ) ); - ReloadRequest(); - handled = true; - break; - - case 's': - case 'S': - m_settings.SetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT, - !m_settings.GetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT ) ); - ReloadRequest(); - handled = true; - break; - - case 'v': - case 'V': - m_settings.SetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL, - !m_settings.GetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL ) ); - ReloadRequest(); - handled = true; - break; - - case 'r': - case 'R': + case ID_VIEW3D_RESET: m_settings.CameraGet().SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER ); m_settings.CameraGet().SetT0_and_T1_current_T(); m_settings.CameraGet().Reset_T1(); diff --git a/3d-viewer/3d_viewer/tools/3d_actions.cpp b/3d-viewer/3d_viewer/tools/3d_actions.cpp index 900a481b23..929718541c 100644 --- a/3d-viewer/3d_viewer/tools/3d_actions.cpp +++ b/3d-viewer/3d_viewer/tools/3d_actions.cpp @@ -40,7 +40,8 @@ TOOL_ACTION EDA_3D_ACTIONS::controlActivate( "3DViewer.Control", AS_GLOBAL, TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( "3DViewer.Control.pivotCenter", AS_ACTIVE, ' ', "", - "Center pivot rotation (Middle mouse click)" ); + _( "Center pivot rotation" ), _( "Center pivot rotation (middle mouse click)" ), + nullptr, AF_NONE, (void*) WXK_SPACE ); TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( "3DViewer.Control.rotateXclockwise", AS_GLOBAL, 0, "", @@ -99,12 +100,14 @@ TOOL_ACTION EDA_3D_ACTIONS::moveDown( "3DViewer.Control.moveDown", TOOL_ACTION EDA_3D_ACTIONS::homeView( "3DViewer.Control.homeView", AS_ACTIVE, WXK_HOME, "", - "Home view" ); + _( "Home view" ), _( "Home view" ), + nullptr, AF_NONE, (void*) WXK_HOME ); TOOL_ACTION EDA_3D_ACTIONS::resetView( "3DViewer.Control.resetView", AS_ACTIVE, 'R', "", - "Reset view" ); + _( "Reset view" ), _( "Reset view" ), + nullptr, AF_NONE, (void*) ID_VIEW3D_RESET ); TOOL_ACTION EDA_3D_ACTIONS::toggleOrtho( "3DViewer.Control.toggleOrtho", AS_GLOBAL, 0, "", diff --git a/3d-viewer/3d_viewer/tools/3d_viewer_control.cpp b/3d-viewer/3d_viewer/tools/3d_viewer_control.cpp index 780f7e39f1..274e37524a 100644 --- a/3d-viewer/3d_viewer/tools/3d_viewer_control.cpp +++ b/3d-viewer/3d_viewer/tools/3d_viewer_control.cpp @@ -264,6 +264,9 @@ void EDA_3D_VIEWER_CONTROL::setTransitions() Go( &EDA_3D_VIEWER_CONTROL::ViewControl, EDA_3D_ACTIONS::viewRight.MakeEvent() ); Go( &EDA_3D_VIEWER_CONTROL::ViewControl, EDA_3D_ACTIONS::viewFront.MakeEvent() ); Go( &EDA_3D_VIEWER_CONTROL::ViewControl, EDA_3D_ACTIONS::viewBack.MakeEvent() ); + Go( &EDA_3D_VIEWER_CONTROL::ViewControl, EDA_3D_ACTIONS::pivotCenter.MakeEvent() ); + Go( &EDA_3D_VIEWER_CONTROL::ViewControl, EDA_3D_ACTIONS::homeView.MakeEvent() ); + Go( &EDA_3D_VIEWER_CONTROL::ViewControl, EDA_3D_ACTIONS::resetView.MakeEvent() ); Go( &EDA_3D_VIEWER_CONTROL::RotateView, EDA_3D_ACTIONS::rotateXCW.MakeEvent() ); Go( &EDA_3D_VIEWER_CONTROL::RotateView, EDA_3D_ACTIONS::rotateXCCW.MakeEvent() ); Go( &EDA_3D_VIEWER_CONTROL::RotateView, EDA_3D_ACTIONS::rotateYCW.MakeEvent() ); diff --git a/3d-viewer/3d_viewer_id.h b/3d-viewer/3d_viewer_id.h index 5e59c55ca7..596d170963 100644 --- a/3d-viewer/3d_viewer_id.h +++ b/3d-viewer/3d_viewer_id.h @@ -30,6 +30,7 @@ enum id_3dview_frm ID_VIEW3D_RIGHT, ID_VIEW3D_FRONT, ID_VIEW3D_BACK, + ID_VIEW3D_RESET, ID_TOOL_SCREENCOPY_TOCLIBBOARD, ID_MENU3D_COLOR, ID_MENU3D_BGCOLOR,