Purge ghost tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18405
This commit is contained in:
@@ -2179,6 +2179,13 @@ void PCB_IO_KICAD_SEXPR::format( const PCB_GROUP* aGroup ) const
|
||||
|
||||
void PCB_IO_KICAD_SEXPR::format( const PCB_GENERATOR* aGenerator ) const
|
||||
{
|
||||
// Some conditions appear to still be creating ghost tuning patterns. Don't save them.
|
||||
if( aGenerator->GetGeneratorType() == wxT( "tuning_pattern" )
|
||||
&& aGenerator->GetItems().empty() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_out->Print( "(generated" );
|
||||
|
||||
KICAD_FORMAT::FormatUuid( m_out, aGenerator->m_Uuid );
|
||||
|
||||
@@ -6115,6 +6115,10 @@ void PCB_IO_KICAD_SEXPR_PARSER::parseGENERATOR( BOARD_ITEM* aParent )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Previous versions had bugs which could save ghost tuning patterns. Ignore them.
|
||||
if( genInfo.genType == wxT( "tuning_pattern" ) && genInfo.memberUuids.empty() )
|
||||
m_generatorInfos.pop_back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user