A board FP is no longer a board FP after a Save As.

This commit is contained in:
Jeff Young 2018-10-24 21:14:36 +01:00
parent 4524dce9bb
commit 244497f514
2 changed files with 8 additions and 5 deletions

View File

@ -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();

View File

@ -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\"" );