Make sure placement menu has a pointer back to its tool.

Fixes: lp:1831730
* https://bugs.launchpad.net/kicad/+bug/1831730
This commit is contained in:
Jeff Young 2019-06-09 23:32:08 +01:00
parent a568e70b99
commit 1f6a5c92d7
1 changed files with 10 additions and 8 deletions

View File

@ -102,6 +102,7 @@ bool ALIGN_DISTRIBUTE_TOOL::Init()
// Create a context menu and make it available through selection tool
m_placementMenu = new ACTION_MENU;
m_placementMenu->SetTool( this );
m_placementMenu->SetIcon( align_items_xpm );
m_placementMenu->SetTitle( _( "Align/Distribute" ) );
@ -112,6 +113,7 @@ bool ALIGN_DISTRIBUTE_TOOL::Init()
m_placementMenu->Add( PCB_ACTIONS::alignRight );
m_placementMenu->Add( PCB_ACTIONS::alignCenterX );
m_placementMenu->Add( PCB_ACTIONS::alignCenterY );
m_placementMenu->AppendSeparator();
m_placementMenu->Add( PCB_ACTIONS::distributeHorizontally );
m_placementMenu->Add( PCB_ACTIONS::distributeVertically );