3D viewer: In menus show Zoom In/out instead of Zoom In/out at Cursor.
Zoom In/out at Cursor does not exist in 3D viewer, and is Zoom In/out when using F1 or F2 keys. Fixes #9107 https://gitlab.com/kicad/code/kicad/issues/9107
This commit is contained in:
parent
ad7275f0a3
commit
0eb0fa64bb
|
@ -76,8 +76,8 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
|
|||
//
|
||||
ACTION_MENU* viewMenu = new ACTION_MENU( false, tool );
|
||||
|
||||
viewMenu->Add( ACTIONS::zoomIn );
|
||||
viewMenu->Add( ACTIONS::zoomOut );
|
||||
viewMenu->Add( ACTIONS::zoomInCenter );
|
||||
viewMenu->Add( ACTIONS::zoomOutCenter );
|
||||
viewMenu->Add( ACTIONS::zoomFitScreen );
|
||||
viewMenu->Add( ACTIONS::zoomRedraw );
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ bool EDA_3D_CONTROLLER::Init()
|
|||
{
|
||||
CONDITIONAL_MENU& ctxMenu = m_menu.GetMenu();
|
||||
|
||||
ctxMenu.AddItem( ACTIONS::zoomIn, SELECTION_CONDITIONS::ShowAlways );
|
||||
ctxMenu.AddItem( ACTIONS::zoomOut, SELECTION_CONDITIONS::ShowAlways );
|
||||
ctxMenu.AddItem( ACTIONS::zoomInCenter, SELECTION_CONDITIONS::ShowAlways );
|
||||
ctxMenu.AddItem( ACTIONS::zoomOutCenter, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
ctxMenu.AddSeparator();
|
||||
ctxMenu.AddItem( EDA_3D_ACTIONS::viewTop, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
@ -346,11 +346,14 @@ void EDA_3D_CONTROLLER::setTransitions()
|
|||
|
||||
// Zoom control
|
||||
Go( &EDA_3D_CONTROLLER::ZoomRedraw, ACTIONS::zoomRedraw.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ZoomInOut, ACTIONS::zoomIn.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ZoomInOut, ACTIONS::zoomOut.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ZoomInOutCenter, ACTIONS::zoomInCenter.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ZoomInOutCenter, ACTIONS::zoomOutCenter.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ZoomFitScreen, ACTIONS::zoomFitScreen.MakeEvent() );
|
||||
// zoom in/out at cursor does not exist in 3D viewer but because F1 and F2 keys generate
|
||||
// a zoomIn/zoomOut event, these events must be captured to use these hot keys. The actual
|
||||
// zoom is the same as ZoomInOutCenter
|
||||
Go( &EDA_3D_CONTROLLER::ZoomInOut, ACTIONS::zoomIn.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ZoomInOut, ACTIONS::zoomOut.MakeEvent() );
|
||||
|
||||
// Grid
|
||||
Go( &EDA_3D_CONTROLLER::On3DGridSelection, EDA_3D_ACTIONS::noGrid.MakeEvent() );
|
||||
|
|
Loading…
Reference in New Issue