diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp index 3e5aa504a2..ea4a2cc8af 100644 --- a/pcbnew/footprint_editor_utils.cpp +++ b/pcbnew/footprint_editor_utils.cpp @@ -225,7 +225,9 @@ void FOOTPRINT_EDIT_FRAME::LoadModuleFromLibrary( LIB_ID aFPID) updateView(); m_canvas->Refresh(); - m_treePane->GetLibTree()->Refresh(); + + m_treePane->GetLibTree()->ExpandLibId( aFPID ); + m_treePane->GetLibTree()->CenterLibId( aFPID ); } @@ -467,8 +469,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( footprint && SaveFootprintAs( footprint ) ) { - SyncLibraryTree( true ); - m_toolManager->GetView()->Update( GetBoard()->m_Modules ); if( IsGalCanvasActive() && GetGalCanvas() ) @@ -484,8 +484,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) // Save Selected Footprint As MODULE* footprint = LoadFootprint( getTargetFPID() ); - if( footprint && SaveFootprintAs( footprint ) ) - SyncLibraryTree( false ); + if( footprint ) + SaveFootprintAs( footprint ); } m_treePane->GetLibTree()->Refresh(); diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index 974ad59422..08a3a1c094 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -953,6 +953,9 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintAs( MODULE* aModule ) m_footprintNameWhenLoaded = footprintName; + // Once saved-as a board footprint is no longer a board footprint + aModule->SetLink( 0 ); + wxString fmt = module_exists ? _( "Component \"%s\" replaced in \"%s\"" ) : _( "Component \"%s\" added in \"%s\"" );