Remove group reference when exporting individual footprints
(Cherry-picked from d923b871d7
)
This commit is contained in:
parent
b4b49a4296
commit
7bc0f8731f
|
@ -763,6 +763,9 @@ void PCB_EDIT_FRAME::ExportFootprintsToLibrary( bool aStoreInNewLib, const wxStr
|
||||||
resetReference( fpCopy );
|
resetReference( fpCopy );
|
||||||
pi->FootprintSave( libPath, fpCopy );
|
pi->FootprintSave( libPath, fpCopy );
|
||||||
|
|
||||||
|
// Remove reference to the group before deleting
|
||||||
|
fpCopy->SetParentGroup( nullptr );
|
||||||
|
|
||||||
delete fpCopy;
|
delete fpCopy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2675,8 +2675,9 @@ void PCB_PLUGIN::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* a
|
||||||
footprint->Flip( footprint->GetPosition(), false );
|
footprint->Flip( footprint->GetPosition(), false );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detach it from the board
|
// Detach it from the board and its group
|
||||||
footprint->SetParent( nullptr );
|
footprint->SetParent( nullptr );
|
||||||
|
footprint->SetParentGroup( nullptr );
|
||||||
|
|
||||||
wxLogTrace( traceKicadPcbPlugin, wxT( "Creating s-expr footprint file '%s'." ), fullPath );
|
wxLogTrace( traceKicadPcbPlugin, wxT( "Creating s-expr footprint file '%s'." ), fullPath );
|
||||||
footprints.insert( footprintName,
|
footprints.insert( footprintName,
|
||||||
|
|
Loading…
Reference in New Issue