Don't attempt to write zone-connection-layers to footprint library.

Fixes https://gitlab.com/kicad/code/kicad/issues/12857
This commit is contained in:
Jeff Young 2022-11-08 12:09:08 +00:00
parent ece752d5a2
commit 1d7c5dce70
1 changed files with 10 additions and 7 deletions

View File

@ -1603,15 +1603,18 @@ void PCB_PLUGIN::format( const PAD* aPad, int aNestLevel ) const
if( aPad->GetKeepTopBottom() )
m_out->Print( 0, " (keep_end_layers)" );
m_out->Print( 0, " (zone_layer_connections" );
for( LSEQ cu = board->GetEnabledLayers().CuStack(); cu; ++cu )
if( board ) // Will be nullptr in footprint library
{
if( aPad->ZoneConnectionCache( *cu ) == ZLC_CONNECTED )
m_out->Print( 0, " %s", m_out->Quotew( LSET::Name( *cu ) ).c_str() );
}
m_out->Print( 0, " (zone_layer_connections" );
m_out->Print( 0, ")" );
for( LSEQ cu = board->GetEnabledLayers().CuStack(); cu; ++cu )
{
if( aPad->ZoneConnectionCache( *cu ) == ZLC_CONNECTED )
m_out->Print( 0, " %s", m_out->Quotew( LSET::Name( *cu ) ).c_str() );
}
m_out->Print( 0, ")" );
}
}
}