eeschema:
CHANGED: Simplifying the context menu and moving all removed items to main menu.
This commit is contained in:
parent
284df4adf8
commit
bddadd1f42
|
@ -171,6 +171,52 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
|
|||
editMenu->Add( EE_ACTIONS::changeSymbols );
|
||||
editMenu->Add( EE_ACTIONS::editPageNumber );
|
||||
|
||||
ACTION_MENU* submenuAttributes = new ACTION_MENU( false, selTool );
|
||||
submenuAttributes->SetTitle( _( "Attributes..." ) );
|
||||
{
|
||||
{
|
||||
ACTION_MENU *attribSimMoveSubMenu = new ACTION_MENU( false, selTool );
|
||||
attribSimMoveSubMenu->SetTitle( _( "Simulation" ) );
|
||||
submenuAttributes->Add( attribSimMoveSubMenu );
|
||||
|
||||
attribSimMoveSubMenu->Add( EE_ACTIONS::setExcludeFromSimulation );
|
||||
attribSimMoveSubMenu->Add( EE_ACTIONS::unsetExcludeFromSimulation );
|
||||
attribSimMoveSubMenu->Add( EE_ACTIONS::toggleExcludeFromSimulation );
|
||||
}
|
||||
|
||||
{
|
||||
ACTION_MENU *attribBOMMoveSubMenu = new ACTION_MENU( false, selTool );
|
||||
attribBOMMoveSubMenu->SetTitle( _( "Bill of Materials" ) );
|
||||
submenuAttributes->Add( attribBOMMoveSubMenu );
|
||||
|
||||
attribBOMMoveSubMenu->Add( EE_ACTIONS::setExcludeFromBOM );
|
||||
attribBOMMoveSubMenu->Add( EE_ACTIONS::unsetExcludeFromBOM );
|
||||
attribBOMMoveSubMenu->Add( EE_ACTIONS::toggleExcludeFromBOM );
|
||||
}
|
||||
|
||||
{
|
||||
ACTION_MENU *attribBoardMoveSubMenu = new ACTION_MENU( false, selTool );
|
||||
attribBoardMoveSubMenu->SetTitle( _( "Exclude from board" ) );
|
||||
submenuAttributes->Add( attribBoardMoveSubMenu );
|
||||
|
||||
attribBoardMoveSubMenu->Add( EE_ACTIONS::setExcludeFromBoard );
|
||||
attribBoardMoveSubMenu->Add( EE_ACTIONS::unsetExcludeFromBoard );
|
||||
attribBoardMoveSubMenu->Add( EE_ACTIONS::toggleExcludeFromBoard );
|
||||
}
|
||||
|
||||
{
|
||||
ACTION_MENU *attribDNPMoveSubMenu = new ACTION_MENU( false, selTool );
|
||||
attribDNPMoveSubMenu->SetTitle( _( "Do not populate" ) );
|
||||
submenuAttributes->Add( attribDNPMoveSubMenu );
|
||||
|
||||
attribDNPMoveSubMenu->Add( EE_ACTIONS::setDNP );
|
||||
attribDNPMoveSubMenu->Add( EE_ACTIONS::unsetDNP );
|
||||
attribDNPMoveSubMenu->Add( EE_ACTIONS::toggleDNP );
|
||||
}
|
||||
}
|
||||
|
||||
editMenu->Add( submenuAttributes );
|
||||
|
||||
//-- View menu -----------------------------------------------------------
|
||||
//
|
||||
ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
|
||||
|
|
|
@ -951,6 +951,7 @@ TOOL_ACTION EE_ACTIONS::unsetDNP( TOOL_ACTION_ARGS()
|
|||
TOOL_ACTION EE_ACTIONS::toggleDNP( TOOL_ACTION_ARGS()
|
||||
.Name( "eeschema.EditorControl.toggleDNP" )
|
||||
.Scope( AS_GLOBAL )
|
||||
.DefaultHotkey( MD_CTRL + MD_ALT + 'X' )
|
||||
.FriendlyName( _( "Toggle Do Not Populate" ) )
|
||||
.Tooltip( _( "Toggle the do not populate attribute" ) ) );
|
||||
|
||||
|
|
|
@ -466,49 +466,16 @@ bool SCH_EDIT_TOOL::Init()
|
|||
|
||||
{
|
||||
CONDITIONAL_MENU *attribMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribMoveSubMenu->SetTitle( _( "Attributes" ) );
|
||||
attribMoveSubMenu->SetTitle( _( "Attributes..." ) );
|
||||
moveMenu.AddMenu( attribMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ), 200 );
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribSimMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribSimMoveSubMenu->SetTitle( _( "Simulation" ) );
|
||||
attribMoveSubMenu->AddMenu( attribSimMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromSimulation,
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromSimulation,
|
||||
E_C::ShowAlways );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromSimulation,
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBOM, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBoard,
|
||||
E_C::ShowAlways );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromSimulation,
|
||||
E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribBOMMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribBOMMoveSubMenu->SetTitle( _( "Bill of Materials" ) );
|
||||
attribMoveSubMenu->AddMenu( attribBOMMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromBOM, E_C::ShowAlways );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromBOM, E_C::ShowAlways );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBOM, E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribBoardMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribBoardMoveSubMenu->SetTitle( _( "Exclude from board" ) );
|
||||
attribMoveSubMenu->AddMenu( attribBoardMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromBoard,
|
||||
E_C::ShowAlways );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromBoard,
|
||||
E_C::ShowAlways );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBoard,
|
||||
E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribDNPMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribDNPMoveSubMenu->SetTitle( _( "Do not populate" ) );
|
||||
attribMoveSubMenu->AddMenu( attribDNPMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::setDNP, E_C::ShowAlways );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::unsetDNP, E_C::ShowAlways );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::toggleDNP, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleDNP, E_C::ShowAlways );
|
||||
}
|
||||
}
|
||||
moveMenu.AddItem( EE_ACTIONS::swap, SELECTION_CONDITIONS::MoreThan( 1 ) );
|
||||
|
@ -562,41 +529,11 @@ bool SCH_EDIT_TOOL::Init()
|
|||
drawMenu.AddMenu( attribMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ), 200 );
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribSimMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribSimMoveSubMenu->SetTitle( _( "Simulation" ) );
|
||||
attribMoveSubMenu->AddMenu( attribSimMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromSimulation, E_C::ShowAlways );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromSimulation,
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromSimulation,
|
||||
E_C::ShowAlways );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromSimulation,
|
||||
E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribBOMMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribBOMMoveSubMenu->SetTitle( _( "Bill of Materials" ) );
|
||||
attribMoveSubMenu->AddMenu( attribBOMMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromBOM, E_C::ShowAlways );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromBOM, E_C::ShowAlways );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBOM, E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribBoardMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribBoardMoveSubMenu->SetTitle( _( "Exclude from board" ) );
|
||||
attribMoveSubMenu->AddMenu( attribBoardMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromBoard, E_C::ShowAlways );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromBoard, E_C::ShowAlways );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBoard, E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribDNPMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribDNPMoveSubMenu->SetTitle( _( "Do not populate" ) );
|
||||
attribMoveSubMenu->AddMenu( attribDNPMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::setDNP, E_C::ShowAlways );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::unsetDNP, E_C::ShowAlways );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::toggleDNP, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBOM, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBoard, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleDNP, E_C::ShowAlways );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -647,41 +584,11 @@ bool SCH_EDIT_TOOL::Init()
|
|||
selToolMenu.AddMenu( attribMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ), 200 );
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribSimMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribSimMoveSubMenu->SetTitle( _( "Simulation" ) );
|
||||
attribMoveSubMenu->AddMenu( attribSimMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromSimulation, E_C::ShowAlways );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromSimulation,
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromSimulation,
|
||||
E_C::ShowAlways );
|
||||
attribSimMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromSimulation,
|
||||
E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribBOMMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribBOMMoveSubMenu->SetTitle( _( "Bill of Materials" ) );
|
||||
attribMoveSubMenu->AddMenu( attribBOMMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromBOM, E_C::ShowAlways );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromBOM, E_C::ShowAlways );
|
||||
attribBOMMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBOM, E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribBoardMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribBoardMoveSubMenu->SetTitle( _( "Exclude from board" ) );
|
||||
attribMoveSubMenu->AddMenu( attribBoardMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::setExcludeFromBoard, E_C::ShowAlways );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::unsetExcludeFromBoard, E_C::ShowAlways );
|
||||
attribBoardMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBoard, E_C::ShowAlways );
|
||||
}
|
||||
|
||||
{
|
||||
CONDITIONAL_MENU *attribDNPMoveSubMenu = new CONDITIONAL_MENU( moveTool );
|
||||
attribDNPMoveSubMenu->SetTitle( _( "Do not populate" ) );
|
||||
attribMoveSubMenu->AddMenu( attribDNPMoveSubMenu, E_C::HasType( SCH_SYMBOL_T ) );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::setDNP, E_C::ShowAlways );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::unsetDNP, E_C::ShowAlways );
|
||||
attribDNPMoveSubMenu->AddItem( EE_ACTIONS::toggleDNP, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBOM, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleExcludeFromBoard, E_C::ShowAlways );
|
||||
attribMoveSubMenu->AddItem( EE_ACTIONS::toggleDNP, E_C::ShowAlways );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue