Edit library footprint command
Provides missing PCB_ACTION for the edit library footprint command. This is needed for python control of the command Fixes https://gitlab.com/kicad/code/kicad/issues/9454
This commit is contained in:
parent
bba742b804
commit
ea4e06124e
|
@ -1473,7 +1473,10 @@ int BOARD_EDITOR_CONTROL::EditFpInFpEditor( const TOOL_EVENT& aEvent )
|
|||
|
||||
auto editor = (FOOTPRINT_EDIT_FRAME*) editFrame->Kiway().Player( FRAME_FOOTPRINT_EDITOR, true );
|
||||
|
||||
editor->LoadFootprintFromBoard( fp );
|
||||
if( aEvent.IsAction( &PCB_ACTIONS::editFpInFpEditor ) )
|
||||
editor->LoadFootprintFromBoard( fp );
|
||||
else if( aEvent.IsAction( &PCB_ACTIONS::editLibFpInFpEditor ) )
|
||||
editor->LoadFootprintFromLibrary( fp->GetFPID() );
|
||||
|
||||
editor->Show( true );
|
||||
editor->Raise(); // Iconize( false );
|
||||
|
@ -1565,6 +1568,7 @@ void BOARD_EDITOR_CONTROL::setTransitions()
|
|||
Go( &BOARD_EDITOR_CONTROL::DrillOrigin, PCB_ACTIONS::drillOrigin.MakeEvent() );
|
||||
|
||||
Go( &BOARD_EDITOR_CONTROL::EditFpInFpEditor, PCB_ACTIONS::editFpInFpEditor.MakeEvent() );
|
||||
Go( &BOARD_EDITOR_CONTROL::EditFpInFpEditor, PCB_ACTIONS::editLibFpInFpEditor.MakeEvent() );
|
||||
|
||||
// Other
|
||||
Go( &BOARD_EDITOR_CONTROL::ToggleLockSelected, PCB_ACTIONS::toggleLock.MakeEvent() );
|
||||
|
|
|
@ -234,6 +234,13 @@ TOOL_ACTION PCB_ACTIONS::editFpInFpEditor( "pcbnew.EditorControl.EditFpInFpEdito
|
|||
_( "Opens the selected footprint in the Footprint Editor" ),
|
||||
BITMAPS::module_editor );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::editLibFpInFpEditor( "pcbnew.EditorControl.EditLibFpInFpEditor",
|
||||
AS_GLOBAL,
|
||||
MD_CTRL + MD_SHIFT + 'E', "",
|
||||
_( "Edit Library Footprint..." ),
|
||||
_( "Opens the selected footprint in the Footprint Editor" ),
|
||||
BITMAPS::module_editor );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::getAndPlace( "pcbnew.InteractiveEdit.FindMove",
|
||||
AS_GLOBAL,
|
||||
'T', LEGACY_HK_NAME( "Get and Move Footprint" ),
|
||||
|
|
|
@ -344,6 +344,8 @@ public:
|
|||
static TOOL_ACTION runDRC;
|
||||
|
||||
static TOOL_ACTION editFpInFpEditor;
|
||||
static TOOL_ACTION editLibFpInFpEditor;
|
||||
|
||||
static TOOL_ACTION showLayersManager;
|
||||
static TOOL_ACTION showPythonConsole;
|
||||
|
||||
|
|
Loading…
Reference in New Issue