Don't use EQUALITY flag when doing a symbol diff with library.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16944
This commit is contained in:
Jeff Young 2024-02-22 12:37:19 +00:00
parent c8b06d54cb
commit adae4de438
2 changed files with 5 additions and 4 deletions

View File

@ -252,7 +252,7 @@ int LIB_FIELD::compare( const LIB_ITEM& aOther, int aCompareFlags ) const
bool ignoreFieldText = false;
if( m_id == REFERENCE_FIELD && ( aCompareFlags & COMPARE_FLAGS::EQUALITY ) )
if( m_id == REFERENCE_FIELD && !( aCompareFlags & COMPARE_FLAGS::EQUALITY ) )
ignoreFieldText = true;
if( m_id == VALUE_FIELD && ( aCompareFlags & COMPARE_FLAGS::ERC ) )

View File

@ -336,10 +336,11 @@ int EE_INSPECTION_TOOL::DiffSymbol( const TOOL_EVENT& aEvent )
flattenedSchSymbol->SetFields( fields );
int flags = LIB_ITEM::COMPARE_FLAGS::EQUALITY | LIB_ITEM::COMPARE_FLAGS::ERC;
if( flattenedSchSymbol->Compare( *flattenedLibSymbol, flags, r ) == 0 )
if( flattenedSchSymbol->Compare( *flattenedLibSymbol, LIB_ITEM::COMPARE_FLAGS::ERC,
r ) == 0 )
{
r->Report( _( "No relevant differences detected." ) );
}
wxPanel* panel = dialog->AddBlankPage( _( "Visual" ) );
SYMBOL_DIFF_WIDGET* diff = constructDiffPanel( panel );