Hide the convert submenu when there are no conversion tools available

Fixes https://gitlab.com/kicad/code/kicad/issues/6092
This commit is contained in:
Ian McInerney 2020-11-04 00:57:49 +00:00
parent d5f83d2685
commit dd84ec1b51
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ bool CONVERT_TOOL::Init()
for( std::shared_ptr<ACTION_MENU>& subMenu : m_selectionTool->GetToolMenu().GetSubMenus() )
{
if( dynamic_cast<SPECIAL_TOOLS_CONTEXT_MENU*>( subMenu.get() ) )
static_cast<CONDITIONAL_MENU*>( subMenu.get() )->AddMenu( m_menu, SELECTION_CONDITIONS::ShowAlways );
static_cast<CONDITIONAL_MENU*>( subMenu.get() )->AddMenu( m_menu, showConvert );
}
return true;