Expose grid origin action in more places

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17007
This commit is contained in:
Jon Evans 2024-02-27 18:50:44 -05:00
parent a8880fb63e
commit 0df5cf7f75
3 changed files with 6 additions and 9 deletions

View File

@ -39,15 +39,7 @@ GRID_MENU::GRID_MENU( EDA_DRAW_FRAME* aParent ) :
{
UpdateTitle();
SetIcon( BITMAPS::grid_select );
APP_SETTINGS_BASE* settings = m_parent->config();
wxArrayString gridsList;
int i = ID_POPUP_GRID_START;
BuildChoiceList( &gridsList, settings, m_parent );
for( const wxString& grid : gridsList )
Append( i++, grid, wxEmptyString, wxITEM_CHECK );
update();
}
@ -77,6 +69,9 @@ void GRID_MENU::update()
while( GetMenuItemCount() > 0 )
Delete( FindItemByPosition( 0 ) );
Add( ACTIONS::gridOrigin );
AppendSeparator();
for( const wxString& grid : gridsList )
{
int idx = i++;

View File

@ -112,6 +112,7 @@ void FOOTPRINT_EDIT_FRAME::doReCreateMenuBar()
editMenu->Add( PCB_ACTIONS::editTextAndGraphics );
editMenu->Add( PCB_ACTIONS::defaultPadProperties );
editMenu->Add( PCB_ACTIONS::enumeratePads );
editMenu->Add( ACTIONS::gridOrigin );
//-- View menu -------------------------------------------------------

View File

@ -211,6 +211,7 @@ void PCB_EDIT_FRAME::doReCreateMenuBar()
editMenu->Add( PCB_ACTIONS::editTeardrops );
editMenu->Add( PCB_ACTIONS::changeFootprints );
editMenu->Add( PCB_ACTIONS::swapLayers );
editMenu->Add( ACTIONS::gridOrigin );
editMenu->AppendSeparator();
editMenu->Add( PCB_ACTIONS::zoneFillAll );