Hide the selection tool submenu in the FP Editor

Fixes https://gitlab.com/kicad/code/kicad/issues/7164
This commit is contained in:
Michael Kavanagh 2021-01-18 19:48:50 +00:00 committed by Jeff Young
parent 12fe44d4b3
commit 7461b96dea
1 changed files with 5 additions and 2 deletions

View File

@ -157,8 +157,11 @@ bool PCB_SELECTION_TOOL::Init()
return m_enteredGroup != nullptr;
};
menu.AddMenu( selectMenu.get(), SELECTION_CONDITIONS::NotEmpty );
menu.AddSeparator( 1000 );
if( frame && frame->IsType( FRAME_PCB_EDITOR ) )
{
menu.AddMenu( selectMenu.get(), SELECTION_CONDITIONS::NotEmpty );
menu.AddSeparator( 1000 );
}
// "Cancel" goes at the top of the context menu when a tool is active
menu.AddItem( ACTIONS::cancelInteractive, activeToolCondition, 1 );