From c98826c8b0c28344fc7c1142a523c3052e4c4b1c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 15 Jul 2022 14:12:37 +0100 Subject: [PATCH] Open newly-pasted footprint on canvas of Footprint Editor. Fixes https://gitlab.com/kicad/code/kicad/issues/11398 --- pcbnew/tools/footprint_editor_control.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index ba6fd63567..8ff2c6a4a5 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -353,7 +353,9 @@ int FOOTPRINT_EDITOR_CONTROL::PasteFootprint( const TOOL_EVENT& aEvent ) m_frame->SaveFootprintInLibrary( m_copiedFootprint.get(), newLib ); m_frame->SyncLibraryTree( true ); + m_frame->LoadFootprintFromLibrary( m_copiedFootprint->GetFPID() ); m_frame->FocusOnLibID( m_copiedFootprint->GetFPID() ); + m_frame->RefreshLibraryTree(); } return 0; @@ -375,6 +377,7 @@ int FOOTPRINT_EDITOR_CONTROL::DuplicateFootprint( const TOOL_EVENT& aEvent ) if( footprint && m_frame->DuplicateFootprint( footprint ) ) { m_frame->SyncLibraryTree( true ); + m_frame->LoadFootprintFromLibrary( m_copiedFootprint->GetFPID() ); m_frame->FocusOnLibID( footprint->GetFPID() ); m_frame->RefreshLibraryTree(); }