Make LIB_ITEM::COMPARE_FLAGS really a flags field, and add ERC.
Before they were 1/2 treated as flags and 1/2 treated as a mode enum. The ERC flag relaxes constraints on data that is settable in the schematic editor. Fixes https://gitlab.com/kicad/code/kicad/issues/11018
This commit is contained in:
+2
-1
@@ -756,8 +756,9 @@ int ERC_TESTER::TestLibSymbolIssues()
|
||||
}
|
||||
|
||||
std::unique_ptr<LIB_SYMBOL> flattenedSymbol = libSymbol->Flatten();
|
||||
constexpr int flags = LIB_ITEM::COMPARE_FLAGS::EQUALITY | LIB_ITEM::COMPARE_FLAGS::ERC;
|
||||
|
||||
if( *flattenedSymbol != *libSymbolInSchematic )
|
||||
if( flattenedSymbol->Compare( *libSymbolInSchematic, flags ) != 0 )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
|
||||
ercItem->SetItems( symbol );
|
||||
|
||||
Reference in New Issue
Block a user