File formatting improvements and fixes.

Symbol library IDs included the library nickname which is incorrect
and meaningless since it will be overwritten by the symbol library
table code.  This is not a file format change as there are no behavioral
differences.
This commit is contained in:
Wayne Stambaugh 2021-11-13 12:57:18 -05:00
parent 53f5d616aa
commit 80c5b1efb1
2 changed files with 3 additions and 3 deletions

View File

@ -305,7 +305,7 @@ static void formatCircle( OUTPUTFORMATTER* aFormatter, int aNestLevel, EDA_SHAPE
const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor, const STROKE_PARAMS& aStroke, FILL_T aFillMode, const COLOR4D& aFillColor,
KIID aUuid = niluuid ) KIID aUuid = niluuid )
{ {
aFormatter->Print( aNestLevel, "(circle (center %s %s) (radius %s) ", aFormatter->Print( aNestLevel, "(circle (center %s %s) (radius %s)\n",
FormatInternalUnits( aCircle->GetStart().x ).c_str(), FormatInternalUnits( aCircle->GetStart().x ).c_str(),
FormatInternalUnits( aCircle->GetStart().y ).c_str(), FormatInternalUnits( aCircle->GetStart().y ).c_str(),
FormatInternalUnits( aCircle->GetRadius() ).c_str() ); FormatInternalUnits( aCircle->GetRadius() ).c_str() );
@ -1738,7 +1738,7 @@ void SCH_SEXPR_PLUGIN_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMATTER& a
int nextFreeFieldId = MANDATORY_FIELDS; int nextFreeFieldId = MANDATORY_FIELDS;
std::vector<LIB_FIELD*> fields; std::vector<LIB_FIELD*> fields;
std::string name = aFormatter.Quotew( aSymbol->GetLibId().Format().wx_str() ); std::string name = aFormatter.Quotew( aSymbol->GetLibId().GetLibItemName().wx_str() );
std::string unitName = aSymbol->GetLibId().GetLibItemName(); std::string unitName = aSymbol->GetLibId().GetLibItemName();
if( !aLibName.IsEmpty() ) if( !aLibName.IsEmpty() )

View File

@ -1111,7 +1111,7 @@ void PCB_IO::format( const FOOTPRINT* aFootprint, int aNestLevel ) const
m_out->Quotes( aFootprint->GetFPID().Format() ).c_str() ); m_out->Quotes( aFootprint->GetFPID().Format() ).c_str() );
if( !( m_ctl & CTL_OMIT_FOOTPRINT_VERSION ) ) if( !( m_ctl & CTL_OMIT_FOOTPRINT_VERSION ) )
m_out->Print( 0, " (version %d) (generator pcbnew)", SEXPR_BOARD_FILE_VERSION ); m_out->Print( 0, " (version %d) (generator pcbnew)\n ", SEXPR_BOARD_FILE_VERSION );
if( aFootprint->IsLocked() ) if( aFootprint->IsLocked() )
m_out->Print( 0, " locked" ); m_out->Print( 0, " locked" );