Expose grid origin action in more places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17007
(cherry picked from commit 0df5cf7f75
)
This commit is contained in:
parent
60dbd0ce0d
commit
0b5c0ef639
|
@ -39,15 +39,7 @@ GRID_MENU::GRID_MENU( EDA_DRAW_FRAME* aParent ) :
|
||||||
{
|
{
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
SetIcon( BITMAPS::grid_select );
|
SetIcon( BITMAPS::grid_select );
|
||||||
|
update();
|
||||||
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 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,6 +69,9 @@ void GRID_MENU::update()
|
||||||
while( GetMenuItemCount() > 0 )
|
while( GetMenuItemCount() > 0 )
|
||||||
Delete( FindItemByPosition( 0 ) );
|
Delete( FindItemByPosition( 0 ) );
|
||||||
|
|
||||||
|
Add( ACTIONS::gridOrigin );
|
||||||
|
AppendSeparator();
|
||||||
|
|
||||||
for( const wxString& grid : gridsList )
|
for( const wxString& grid : gridsList )
|
||||||
{
|
{
|
||||||
int idx = i++;
|
int idx = i++;
|
||||||
|
|
|
@ -112,6 +112,7 @@ void FOOTPRINT_EDIT_FRAME::doReCreateMenuBar()
|
||||||
editMenu->Add( PCB_ACTIONS::editTextAndGraphics );
|
editMenu->Add( PCB_ACTIONS::editTextAndGraphics );
|
||||||
editMenu->Add( PCB_ACTIONS::defaultPadProperties );
|
editMenu->Add( PCB_ACTIONS::defaultPadProperties );
|
||||||
editMenu->Add( PCB_ACTIONS::enumeratePads );
|
editMenu->Add( PCB_ACTIONS::enumeratePads );
|
||||||
|
editMenu->Add( ACTIONS::gridOrigin );
|
||||||
|
|
||||||
|
|
||||||
//-- View menu -------------------------------------------------------
|
//-- View menu -------------------------------------------------------
|
||||||
|
|
|
@ -211,6 +211,7 @@ void PCB_EDIT_FRAME::doReCreateMenuBar()
|
||||||
editMenu->Add( PCB_ACTIONS::editTeardrops );
|
editMenu->Add( PCB_ACTIONS::editTeardrops );
|
||||||
editMenu->Add( PCB_ACTIONS::changeFootprints );
|
editMenu->Add( PCB_ACTIONS::changeFootprints );
|
||||||
editMenu->Add( PCB_ACTIONS::swapLayers );
|
editMenu->Add( PCB_ACTIONS::swapLayers );
|
||||||
|
editMenu->Add( ACTIONS::gridOrigin );
|
||||||
|
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
editMenu->Add( PCB_ACTIONS::zoneFillAll );
|
editMenu->Add( PCB_ACTIONS::zoneFillAll );
|
||||||
|
|
Loading…
Reference in New Issue