Add AutoplaceFields to symbol tool context menu.
This commit is contained in:
parent
7c25001622
commit
5f851a4bad
|
@ -150,7 +150,7 @@ public:
|
|||
static TOOL_ACTION showDatasheet;
|
||||
static TOOL_ACTION showMarkerInfo;
|
||||
static TOOL_ACTION showSymbolEditor;
|
||||
static TOOL_ACTION editWithSymbolEditor;
|
||||
static TOOL_ACTION editWithLibEdit;
|
||||
static TOOL_ACTION showLibraryBrowser;
|
||||
|
||||
/// Clipboard
|
||||
|
|
|
@ -388,24 +388,25 @@ bool SCH_EDIT_TOOL::Init()
|
|||
//
|
||||
CONDITIONAL_MENU& drawMenu = drawingTools->GetToolMenu().GetMenu();
|
||||
|
||||
drawMenu.AddItem( EE_ACTIONS::rotateCCW, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::rotateCW, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::mirrorX, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::mirrorY, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::rotateCCW, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::rotateCW, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::mirrorX, orientCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::mirrorY, orientCondition, 200 );
|
||||
|
||||
drawMenu.AddItem( EE_ACTIONS::properties, propertiesCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editReference, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editValue, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editFootprint, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::convertDeMorgan, EE_CONDITIONS::SingleDeMorganSymbol, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::properties, propertiesCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editReference, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editValue, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editFootprint, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::autoplaceFields, singleComponentCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::convertDeMorgan, EE_CONDITIONS::SingleDeMorganSymbol, 200 );
|
||||
|
||||
std::shared_ptr<SYMBOL_UNIT_MENU> symUnitMenu2 = std::make_shared<SYMBOL_UNIT_MENU>();
|
||||
symUnitMenu2->SetTool( drawingTools );
|
||||
drawingTools->GetToolMenu().AddSubMenu( symUnitMenu2 );
|
||||
drawMenu.AddMenu( symUnitMenu2.get(), EE_CONDITIONS::SingleMultiUnitSymbol, 1 );
|
||||
|
||||
drawMenu.AddItem( EE_ACTIONS::editWithSymbolEditor,
|
||||
singleComponentCondition && EE_CONDITIONS::Idle, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::editWithLibEdit, singleComponentCondition
|
||||
&& EE_CONDITIONS::Idle, 200 );
|
||||
|
||||
drawMenu.AddItem( EE_ACTIONS::toShapeSlash, entryCondition, 200 );
|
||||
drawMenu.AddItem( EE_ACTIONS::toShapeBackslash, entryCondition, 200 );
|
||||
|
@ -439,8 +440,8 @@ bool SCH_EDIT_TOOL::Init()
|
|||
m_selectionTool->GetToolMenu().AddSubMenu( symUnitMenu3 );
|
||||
selToolMenu.AddMenu( symUnitMenu3.get(), EE_CONDITIONS::SingleMultiUnitSymbol, 1 );
|
||||
|
||||
selToolMenu.AddItem( EE_ACTIONS::editWithSymbolEditor,
|
||||
singleComponentCondition && EE_CONDITIONS::Idle, 200 );
|
||||
selToolMenu.AddItem( EE_ACTIONS::editWithLibEdit, singleComponentCondition
|
||||
&& EE_CONDITIONS::Idle, 200 );
|
||||
|
||||
selToolMenu.AddItem( EE_ACTIONS::toShapeSlash, entryCondition, 200 );
|
||||
selToolMenu.AddItem( EE_ACTIONS::toShapeBackslash, entryCondition, 200 );
|
||||
|
|
|
@ -81,7 +81,7 @@ TOOL_ACTION EE_ACTIONS::showSymbolEditor( "eeschema.EditorControl.showSymbolEdit
|
|||
_( "Show Symbol Editor" ), _( "Create, delete and edit symbols" ),
|
||||
libedit_xpm );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::editWithSymbolEditor( "eeschema.EditorControl.editWithSymbolEditor",
|
||||
TOOL_ACTION EE_ACTIONS::editWithLibEdit( "eeschema.EditorControl.editWithSymbolEditor",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_EDIT_COMPONENT_WITH_LIBEDIT ),
|
||||
_( "Edit with Symbol Editor" ), _( "Open the symbol editor to edit the symbol" ),
|
||||
libedit_xpm );
|
||||
|
@ -705,7 +705,7 @@ int SCH_EDITOR_CONTROL::FindReplace( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
|
||||
int SCH_EDITOR_CONTROL::EditWithSymbolEditor( const TOOL_EVENT& aEvent )
|
||||
int SCH_EDITOR_CONTROL::EditWithLibEdit( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
SELECTION& selection = selTool->RequestSelection( EE_COLLECTOR::ComponentsOnly );
|
||||
|
@ -830,7 +830,7 @@ void SCH_EDITOR_CONTROL::setTransitions()
|
|||
Go( &SCH_EDITOR_CONTROL::FindReplace, ACTIONS::find.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::FindReplace, ACTIONS::replace.MakeEvent() );
|
||||
|
||||
Go( &SCH_EDITOR_CONTROL::EditWithSymbolEditor, EE_ACTIONS::editWithSymbolEditor.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::EditWithLibEdit, EE_ACTIONS::editWithLibEdit.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::ShowSymbolEditor, EE_ACTIONS::showSymbolEditor.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::ShowLibraryBrowser, EE_ACTIONS::showLibraryBrowser.MakeEvent() );
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
|
||||
int FindReplace( const TOOL_EVENT& aEvent );
|
||||
|
||||
int EditWithSymbolEditor( const TOOL_EVENT& aEvent );
|
||||
int EditWithLibEdit( const TOOL_EVENT& aEvent );
|
||||
int ShowSymbolEditor( const TOOL_EVENT& aEvent );
|
||||
int ShowLibraryBrowser( const TOOL_EVENT& aEvent );
|
||||
|
||||
|
|
Loading…
Reference in New Issue