diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index ff142f19fe..78f7ccfdf1 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -113,7 +113,7 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() submenuImport->Add( EE_ACTIONS::importFPAssignments, ACTION_MENU::NORMAL, _( "Footprint Assignments..." ) ); - submenuImport->Add( EE_ACTIONS::schImportGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) ); + submenuImport->Add( EE_ACTIONS::importGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) ); fileMenu->Add( submenuImport ); diff --git a/eeschema/symbol_editor/menubar_symbol_editor.cpp b/eeschema/symbol_editor/menubar_symbol_editor.cpp index 2b98849a65..800f061e85 100644 --- a/eeschema/symbol_editor/menubar_symbol_editor.cpp +++ b/eeschema/symbol_editor/menubar_symbol_editor.cpp @@ -66,7 +66,7 @@ void SYMBOL_EDIT_FRAME::doReCreateMenuBar() submenuImport->SetIcon( BITMAPS::import ); submenuImport->Add( EE_ACTIONS::importSymbol, ACTION_MENU::NORMAL, _( "Symbol..." ) ); - submenuImport->Add( EE_ACTIONS::symbolImportGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) ); + submenuImport->Add( EE_ACTIONS::importGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) ); fileMenu->Add( submenuImport ); diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index b7ff94eaf8..bb9d7871fd 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -553,7 +553,7 @@ void SYMBOL_EDIT_FRAME::setupUIConditions() mgr->SetConditions( EE_ACTIONS::drawSymbolLines, EDIT_TOOL( EE_ACTIONS::drawSymbolLines ) ); mgr->SetConditions( EE_ACTIONS::drawSymbolPolygon, EDIT_TOOL( EE_ACTIONS::drawSymbolPolygon ) ); mgr->SetConditions( EE_ACTIONS::placeSymbolAnchor, EDIT_TOOL( EE_ACTIONS::placeSymbolAnchor ) ); - mgr->SetConditions( EE_ACTIONS::symbolImportGraphics, EDIT_TOOL( EE_ACTIONS::symbolImportGraphics ) ); + mgr->SetConditions( EE_ACTIONS::importGraphics, EDIT_TOOL( EE_ACTIONS::importGraphics ) ); #undef CHECK #undef ENABLE diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index a7bd94c654..ec62cae6c5 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -369,16 +369,6 @@ TOOL_ACTION EE_ACTIONS::placeSymbolAnchor( TOOL_ACTION_ARGS() .Icon( BITMAPS::anchor ) .Flags( AF_ACTIVATE ) ); -TOOL_ACTION EE_ACTIONS::symbolImportGraphics( TOOL_ACTION_ARGS() - .Name( "eeschema.SymbolDrawing.symbolImportGraphics" ) - .Scope( AS_GLOBAL ) - .DefaultHotkey( MD_SHIFT + MD_CTRL + 'F' ) - .LegacyHotkeyName( "Place DXF" ) - .FriendlyName( _( "Import Graphics..." ) ) - .Tooltip( _( "Import 2D drawing file" ) ) - .Icon( BITMAPS::import_vector ) - .Flags( AF_ACTIVATE ) ); - // SYMBOL_EDITOR_PIN_TOOL // TOOL_ACTION EE_ACTIONS::pushPinLength( TOOL_ACTION_ARGS() @@ -572,15 +562,6 @@ TOOL_ACTION EE_ACTIONS::placeImage( TOOL_ACTION_ARGS() .Flags( AF_ACTIVATE ) .Parameter( nullptr ) ); -TOOL_ACTION EE_ACTIONS::schImportGraphics( TOOL_ACTION_ARGS() - .Name( "eeschema.InteractiveDrawing.schImportGraphics" ) - .Scope( AS_GLOBAL ) - .DefaultHotkey( MD_SHIFT + MD_CTRL + 'F' ) - .LegacyHotkeyName( "Place DXF" ) - .FriendlyName( _( "Import Graphics..." ) ) - .Tooltip( _( "Import 2D drawing file" ) ) - .Icon( BITMAPS::import_vector ) - .Flags( AF_ACTIVATE ) ); // SCH_EDIT_TOOL // @@ -1032,6 +1013,16 @@ TOOL_ACTION EE_ACTIONS::drawSheetOnClipboard( TOOL_ACTION_ARGS() .Tooltip( _( "Export drawing of current sheet to clipboard" ) ) .Icon( BITMAPS::copy ) ); +TOOL_ACTION EE_ACTIONS::importGraphics( TOOL_ACTION_ARGS() + .Name( "eeschema.EditorControl.importGraphics" ) + .Scope( AS_GLOBAL ) + .DefaultHotkey( MD_SHIFT + MD_CTRL + 'F' ) + .LegacyHotkeyName( "Place DXF" ) + .FriendlyName( _( "Import Graphics..." ) ) + .Tooltip( _( "Import 2D drawing file" ) ) + .Icon( BITMAPS::import_vector ) + .Flags( AF_ACTIVATE ) ); + TOOL_ACTION EE_ACTIONS::showPcbNew( TOOL_ACTION_ARGS() .Name( "eeschema.EditorControl.showPcbNew" ) .Scope( AS_GLOBAL ) diff --git a/eeschema/tools/ee_actions.h b/eeschema/tools/ee_actions.h index 742082ef00..c3bceeef5d 100644 --- a/eeschema/tools/ee_actions.h +++ b/eeschema/tools/ee_actions.h @@ -97,7 +97,6 @@ public: static TOOL_ACTION drawArc; static TOOL_ACTION drawLines; static TOOL_ACTION placeImage; - static TOOL_ACTION schImportGraphics; static TOOL_ACTION undoLastSegment; static TOOL_ACTION switchSegmentPosture; @@ -108,7 +107,6 @@ public: static TOOL_ACTION drawSymbolLines; static TOOL_ACTION drawSymbolPolygon; static TOOL_ACTION placeSymbolAnchor; - static TOOL_ACTION symbolImportGraphics; // Interactive Editing static TOOL_ACTION alignToGrid; @@ -242,6 +240,7 @@ public: static TOOL_ACTION showSymbolTree; static TOOL_ACTION hideSymbolTree; static TOOL_ACTION drawSheetOnClipboard; + static TOOL_ACTION importGraphics; static TOOL_ACTION exportSymbolView; static TOOL_ACTION exportSymbolAsSVG; static TOOL_ACTION showPythonConsole; diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 18b5d53154..74946fc05c 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -758,7 +758,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) } -int SCH_DRAWING_TOOLS::SchImportGraphics( const TOOL_EVENT& aEvent ) +int SCH_DRAWING_TOOLS::ImportGraphics( const TOOL_EVENT& aEvent ) { if( m_inDrawingTool ) return 0; @@ -2193,5 +2193,5 @@ void SCH_DRAWING_TOOLS::setTransitions() Go( &SCH_DRAWING_TOOLS::DrawShape, EE_ACTIONS::drawArc.MakeEvent() ); Go( &SCH_DRAWING_TOOLS::DrawShape, EE_ACTIONS::drawTextBox.MakeEvent() ); Go( &SCH_DRAWING_TOOLS::PlaceImage, EE_ACTIONS::placeImage.MakeEvent() ); - Go( &SCH_DRAWING_TOOLS::SchImportGraphics, EE_ACTIONS::schImportGraphics.MakeEvent() ); + Go( &SCH_DRAWING_TOOLS::ImportGraphics, EE_ACTIONS::importGraphics.MakeEvent() ); } diff --git a/eeschema/tools/sch_drawing_tools.h b/eeschema/tools/sch_drawing_tools.h index d49d769327..fd47e53813 100644 --- a/eeschema/tools/sch_drawing_tools.h +++ b/eeschema/tools/sch_drawing_tools.h @@ -55,7 +55,7 @@ public: int DrawShape( const TOOL_EVENT& aEvent ); int DrawSheet( const TOOL_EVENT& aEvent ); int PlaceImage( const TOOL_EVENT& aEvent ); - int SchImportGraphics( const TOOL_EVENT& aEvent ); + int ImportGraphics( const TOOL_EVENT& aEvent ); private: SCH_LINE* findWire( const VECTOR2I& aPosition ); diff --git a/eeschema/tools/symbol_editor_drawing_tools.cpp b/eeschema/tools/symbol_editor_drawing_tools.cpp index 4e8612c2b2..8c5d46a59e 100644 --- a/eeschema/tools/symbol_editor_drawing_tools.cpp +++ b/eeschema/tools/symbol_editor_drawing_tools.cpp @@ -654,7 +654,7 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor( const TOOL_EVENT& aEvent ) } -int SYMBOL_EDITOR_DRAWING_TOOLS::SymbolImportGraphics( const TOOL_EVENT& aEvent ) +int SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics( const TOOL_EVENT& aEvent ) { LIB_SYMBOL* symbol = m_frame->GetCurSymbol(); @@ -868,6 +868,6 @@ void SYMBOL_EDITOR_DRAWING_TOOLS::setTransitions() Go( &SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape, EE_ACTIONS::drawSymbolPolygon.MakeEvent() ); Go( &SYMBOL_EDITOR_DRAWING_TOOLS::DrawSymbolTextBox, EE_ACTIONS::drawSymbolTextBox.MakeEvent() ); Go( &SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor, EE_ACTIONS::placeSymbolAnchor.MakeEvent() ); - Go( &SYMBOL_EDITOR_DRAWING_TOOLS::SymbolImportGraphics, EE_ACTIONS::symbolImportGraphics.MakeEvent() ); + Go( &SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics, EE_ACTIONS::importGraphics.MakeEvent() ); Go( &SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem, EE_ACTIONS::repeatDrawItem.MakeEvent() ); } diff --git a/eeschema/tools/symbol_editor_drawing_tools.h b/eeschema/tools/symbol_editor_drawing_tools.h index 21a791cf43..d9d478c1ef 100644 --- a/eeschema/tools/symbol_editor_drawing_tools.h +++ b/eeschema/tools/symbol_editor_drawing_tools.h @@ -52,7 +52,7 @@ public: int DrawShape( const TOOL_EVENT& aEvent ); int DrawSymbolTextBox( const TOOL_EVENT& aEvent ); int PlaceAnchor( const TOOL_EVENT& aEvent ); - int SymbolImportGraphics( const TOOL_EVENT& aEvent ); + int ImportGraphics( const TOOL_EVENT& aEvent ); int RepeatDrawItem( const TOOL_EVENT& aEvent );