pcbnew: Only write fill flag for circles, rectangles and polygons

The other shapes don't have the same concept of being filled
(their fill is only a viewing mode, not an actual saved property).
This commit is contained in:
Ian McInerney 2020-11-15 22:03:59 +00:00
parent 8c08b861ab
commit ceb51bb103
1 changed files with 18 additions and 10 deletions

View File

@ -841,11 +841,15 @@ void PCB_IO::format( PCB_SHAPE* aShape, int aNestLevel ) const
m_out->Print( 0, " (width %s)", FormatInternalUnits( aShape->GetWidth() ).c_str() );
// The filled flag represents if a solid fill is present
// The filled flag represents if a solid fill is present on circles, rectangles and polygons
if( ( aShape->GetShape() == S_POLYGON ) || ( aShape->GetShape() == S_RECT )
|| ( aShape->GetShape() == S_CIRCLE ) )
{
if( aShape->IsFilled() )
m_out->Print( 0, " (fill solid)" );
else
m_out->Print( 0, " (fill none)" );
}
m_out->Print( 0, " (tstamp %s)", TO_UTF8( aShape->m_Uuid.AsString() ) );
@ -932,11 +936,15 @@ void PCB_IO::format( FP_SHAPE* aFPShape, int aNestLevel ) const
m_out->Print( 0, " (width %s)", FormatInternalUnits( aFPShape->GetWidth() ).c_str() );
// The filled flag represents if a solid fill is present
// The filled flag represents if a solid fill is present on circles, rectangles and polygons
if( ( aFPShape->GetShape() == S_POLYGON ) || ( aFPShape->GetShape() == S_RECT )
|| ( aFPShape->GetShape() == S_CIRCLE ) )
{
if( aFPShape->IsFilled() )
m_out->Print( 0, " (fill solid)" );
else
m_out->Print( 0, " (fill none)" );
}
m_out->Print( 0, " (tstamp %s)", TO_UTF8( aFPShape->m_Uuid.AsString() ) );