Access tools' TOOL_MENUs rather than CONDITIONAL_MENUs
This means that non-top-level tools, for example EDIT_TOOL and PCB_EDITOR_CONTROL can submit their own menus to the top-level tool's TOOL_MENU, which will then retain a reference to it and make it available for the CONTEXT_MENU that is shown.
This commit is contained in:
committed by
Maciej Suminski
parent
d7db84e282
commit
c50d28d94d
@@ -77,8 +77,9 @@ bool PLACEMENT_TOOL::Init()
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::distributeVertically );
|
||||
SET_BITMAP( KiBitmap( distribute_vertical_xpm ) );
|
||||
|
||||
m_selectionTool->GetMenu().AddMenu( m_placementMenu, _( "Align/distribute" ), false,
|
||||
SELECTION_CONDITIONS::MoreThan( 1 ) );
|
||||
m_selectionTool->GetToolMenu().GetMenu().AddMenu(
|
||||
m_placementMenu, _( "Align/distribute" ), false,
|
||||
SELECTION_CONDITIONS::MoreThan( 1 ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user