Add Grid Settings to PL_EDITOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/14612
This commit is contained in:
parent
14be1935e8
commit
4eddc7131d
|
@ -113,6 +113,7 @@ void PL_EDITOR_FRAME::doReCreateMenuBar()
|
||||||
|
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
viewMenu->Add( ACTIONS::toggleGrid, ACTION_MENU::CHECK );
|
viewMenu->Add( ACTIONS::toggleGrid, ACTION_MENU::CHECK );
|
||||||
|
viewMenu->Add( ACTIONS::gridProperties );
|
||||||
|
|
||||||
// Units submenu
|
// Units submenu
|
||||||
ACTION_MENU* unitsSubMenu = new ACTION_MENU( false, selTool );
|
ACTION_MENU* unitsSubMenu = new ACTION_MENU( false, selTool );
|
||||||
|
|
|
@ -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_RANGE( ID_FILE1, ID_FILEMAX, PL_EDITOR_FRAME::OnFileHistory )
|
||||||
EVT_MENU( ID_FILE_LIST_CLEAR, PL_EDITOR_FRAME::OnClearFileHistory )
|
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_COORDINATE_ORIGIN, PL_EDITOR_FRAME::OnSelectCoordOriginCorner )
|
||||||
EVT_CHOICE( ID_SELECT_PAGE_NUMBER, PL_EDITOR_FRAME::OnSelectPage )
|
EVT_CHOICE( ID_SELECT_PAGE_NUMBER, PL_EDITOR_FRAME::OnSelectPage )
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,13 @@
|
||||||
|
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <tool/action_toolbar.h>
|
#include <tool/action_toolbar.h>
|
||||||
|
#include <tool/tool_manager.h>
|
||||||
|
#include <tools/pl_actions.h>
|
||||||
|
#include <tools/pl_selection_tool.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
|
|
||||||
#include "pl_editor_id.h"
|
#include "pl_editor_id.h"
|
||||||
#include "pl_editor_frame.h"
|
#include "pl_editor_frame.h"
|
||||||
#include "tools/pl_actions.h"
|
|
||||||
|
|
||||||
void PL_EDITOR_FRAME::ReCreateHToolbar()
|
void PL_EDITOR_FRAME::ReCreateHToolbar()
|
||||||
{
|
{
|
||||||
|
@ -169,6 +171,11 @@ void PL_EDITOR_FRAME::ReCreateOptToolbar()
|
||||||
m_optionsToolBar->SetAuiManager( &m_auimgr );
|
m_optionsToolBar->SetAuiManager( &m_auimgr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PL_SELECTION_TOOL* selTool = m_toolManager->GetTool<PL_SELECTION_TOOL>();
|
||||||
|
std::unique_ptr<ACTION_MENU> gridMenu = std::make_unique<ACTION_MENU>( 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::toggleGrid, ACTION_TOOLBAR::TOGGLE );
|
||||||
m_optionsToolBar->Add( ACTIONS::inchesUnits, ACTION_TOOLBAR::TOGGLE );
|
m_optionsToolBar->Add( ACTIONS::inchesUnits, ACTION_TOOLBAR::TOGGLE );
|
||||||
m_optionsToolBar->Add( ACTIONS::milsUnits, ACTION_TOOLBAR::TOGGLE );
|
m_optionsToolBar->Add( ACTIONS::milsUnits, ACTION_TOOLBAR::TOGGLE );
|
||||||
|
|
Loading…
Reference in New Issue