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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16944

(cherry picked from commit adae4de438)
This commit is contained in:
Jeff Young 2024-02-22 12:37:19 +00:00 committed by Roberto Fernandez Bautista
parent c3bcbb6238
commit 12c21abdff
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; bool ignoreFieldText = false;
if( m_id == REFERENCE_FIELD && ( aCompareFlags & COMPARE_FLAGS::EQUALITY ) ) if( m_id == REFERENCE_FIELD && !( aCompareFlags & COMPARE_FLAGS::EQUALITY ) )
ignoreFieldText = true; ignoreFieldText = true;
if( m_id == VALUE_FIELD && ( aCompareFlags & COMPARE_FLAGS::ERC ) ) 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 ); flattenedSchSymbol->SetFields( fields );
int flags = LIB_ITEM::COMPARE_FLAGS::EQUALITY | LIB_ITEM::COMPARE_FLAGS::ERC; if( flattenedSchSymbol->Compare( *flattenedLibSymbol, LIB_ITEM::COMPARE_FLAGS::ERC,
r ) == 0 )
if( flattenedSchSymbol->Compare( *flattenedLibSymbol, flags, r ) == 0 ) {
r->Report( _( "No relevant differences detected." ) ); r->Report( _( "No relevant differences detected." ) );
}
wxPanel* panel = dialog->AddBlankPage( _( "Visual" ) ); wxPanel* panel = dialog->AddBlankPage( _( "Visual" ) );
SYMBOL_DIFF_WIDGET* diff = constructDiffPanel( panel ); SYMBOL_DIFF_WIDGET* diff = constructDiffPanel( panel );