Don't export libid with footprints
We use the LIBID for board files to locate the correct library for the footprint. Once exported, the footprint should be associated with the library that contains it, if any. Fixes https://gitlab.com/kicad/code/kicad/issues/5400
This commit is contained in:
parent
4e08ec79dc
commit
691c33e003
|
@ -258,7 +258,7 @@ UTF8 LIB_ID::Format() const
|
|||
|
||||
UTF8 LIB_ID::GetLibItemNameAndRev() const
|
||||
{
|
||||
UTF8 ret;
|
||||
UTF8 ret = item_name;
|
||||
|
||||
if( revision.size() )
|
||||
{
|
||||
|
|
|
@ -927,8 +927,12 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const
|
|||
}
|
||||
}
|
||||
|
||||
m_out->Print( aNestLevel, "(module %s",
|
||||
m_out->Quotes( aModule->GetFPID().Format() ).c_str() );
|
||||
if( m_ctl & CTL_OMIT_LIBNAME )
|
||||
m_out->Print( aNestLevel, "(module %s",
|
||||
m_out->Quotes( aModule->GetFPID().GetLibItemNameAndRev() ).c_str() );
|
||||
else
|
||||
m_out->Print( aNestLevel, "(module %s",
|
||||
m_out->Quotes( aModule->GetFPID().Format() ).c_str() );
|
||||
|
||||
if( aModule->IsLocked() )
|
||||
m_out->Print( 0, " locked" );
|
||||
|
|
|
@ -81,7 +81,8 @@ class TEXTE_PCB;
|
|||
//#define SEXPR_BOARD_FILE_VERSION 20200818 // Remove Status flag bitmap and setup counts
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200819 // Add board-level properties
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200825 // Remove host information
|
||||
#define SEXPR_BOARD_FILE_VERSION 20200828 // Add new fabrication attributes
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200828 // Add new fabrication attributes
|
||||
#define SEXPR_BOARD_FILE_VERSION 20200829 // Remove library name from exported footprints
|
||||
|
||||
#define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag
|
||||
|
||||
|
@ -93,6 +94,7 @@ class TEXTE_PCB;
|
|||
#define CTL_OMIT_AT (1 << 5) ///< Omit position and rotation
|
||||
// (always saved with potion 0,0 and rotation = 0 in library)
|
||||
//#define CTL_OMIT_HIDE (1 << 6) // found and defined in eda_text.h
|
||||
#define CTL_OMIT_LIBNAME (1 << 7) ///< Omit lib alias when saving (used for board/not library)
|
||||
|
||||
|
||||
// common combinations of the above:
|
||||
|
@ -101,7 +103,7 @@ class TEXTE_PCB;
|
|||
#define CTL_FOR_CLIPBOARD (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS)
|
||||
|
||||
/// Format output for a footprint library instead of clipboard or BOARD
|
||||
#define CTL_FOR_LIBRARY (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS|CTL_OMIT_TSTAMPS|CTL_OMIT_PATH|CTL_OMIT_AT)
|
||||
#define CTL_FOR_LIBRARY (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS|CTL_OMIT_TSTAMPS|CTL_OMIT_PATH|CTL_OMIT_AT|CTL_OMIT_LIBNAME)
|
||||
|
||||
/// The zero arg constructor when PCB_IO is used for PLUGIN::Load() and PLUGIN::Save()ing
|
||||
/// a BOARD file underneath IO_MGR.
|
||||
|
|
Loading…
Reference in New Issue