diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index 50525bd278..3086ed281d 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -113,6 +113,7 @@ void PL_EDITOR_FRAME::doReCreateMenuBar() viewMenu->AppendSeparator(); viewMenu->Add( ACTIONS::toggleGrid, ACTION_MENU::CHECK ); + viewMenu->Add( ACTIONS::gridProperties ); // Units submenu ACTION_MENU* unitsSubMenu = new ACTION_MENU( false, selTool ); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 5b9c949d9a..b896870867 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -71,6 +71,8 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_FILE1, ID_FILEMAX, PL_EDITOR_FRAME::OnFileHistory ) EVT_MENU( ID_FILE_LIST_CLEAR, PL_EDITOR_FRAME::OnClearFileHistory ) + EVT_MENU( ID_GRID_SETTINGS, PL_EDITOR_FRAME::OnGridSettings ) + EVT_CHOICE( ID_SELECT_COORDINATE_ORIGIN, PL_EDITOR_FRAME::OnSelectCoordOriginCorner ) EVT_CHOICE( ID_SELECT_PAGE_NUMBER, PL_EDITOR_FRAME::OnSelectPage ) diff --git a/pagelayout_editor/toolbars_pl_editor.cpp b/pagelayout_editor/toolbars_pl_editor.cpp index 923a3ef364..042a4a2dcd 100644 --- a/pagelayout_editor/toolbars_pl_editor.cpp +++ b/pagelayout_editor/toolbars_pl_editor.cpp @@ -21,11 +21,13 @@ #include #include +#include +#include +#include #include #include "pl_editor_id.h" #include "pl_editor_frame.h" -#include "tools/pl_actions.h" void PL_EDITOR_FRAME::ReCreateHToolbar() { @@ -169,6 +171,11 @@ void PL_EDITOR_FRAME::ReCreateOptToolbar() m_optionsToolBar->SetAuiManager( &m_auimgr ); } + PL_SELECTION_TOOL* selTool = m_toolManager->GetTool(); + std::unique_ptr gridMenu = std::make_unique( false, selTool ); + gridMenu->Add( ACTIONS::gridProperties ); + m_optionsToolBar->AddToolContextMenu( ACTIONS::toggleGrid, std::move( gridMenu ) ); + m_optionsToolBar->Add( ACTIONS::toggleGrid, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->Add( ACTIONS::inchesUnits, ACTION_TOOLBAR::TOGGLE ); m_optionsToolBar->Add( ACTIONS::milsUnits, ACTION_TOOLBAR::TOGGLE );