When copying modified footprint make sure we get the latest.

Fixes: lp:1805413
* https://bugs.launchpad.net/kicad/+bug/1805413
This commit is contained in:
Jeff Young 2018-11-27 19:19:54 +00:00
parent 7b2f245283
commit 8ca0fe6722
1 changed files with 10 additions and 1 deletions

View File

@ -503,10 +503,19 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if( getTargetFPID().IsValid() )
{
LIB_ID fpID = getTargetFPID();
m_copiedModule.reset( LoadFootprint( fpID ) );
if( fpID == GetLoadedFPID() )
m_copiedModule.reset( new MODULE( *GetBoard()->m_Modules.GetFirst() ) );
else
m_copiedModule.reset( LoadFootprint( fpID ) );
if( id == ID_MODEDIT_CUT_PART )
{
if( fpID == GetLoadedFPID() )
Clear_Pcb( false );
DeleteModuleFromLibrary( fpID, false );
}
SyncLibraryTree( true );
}