Handle hierarchical symbols when performing "lib symbol changed" check.

Fixes https://gitlab.com/kicad/code/kicad/issues/6002
This commit is contained in:
Jeff Young 2020-10-19 15:34:59 +01:00
parent 3100273db1
commit d0ddc909dc
1 changed files with 12 additions and 7 deletions

View File

@ -632,7 +632,11 @@ int ERC_TESTER::TestLibSymbolIssues()
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) ); markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
} }
else if( *libSymbol != *libSymbolInSchematic ) else
{
std::unique_ptr<LIB_PART> flattenedSymbol = libSymbol->Flatten();
if( *flattenedSymbol != *libSymbolInSchematic )
{ {
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES ); std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol ); ercItem->SetItems( symbol );
@ -643,6 +647,7 @@ int ERC_TESTER::TestLibSymbolIssues()
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) ); markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
} }
} }
}
for( SCH_MARKER* marker : markers ) for( SCH_MARKER* marker : markers )
{ {