From 447d0d71d3071db7551678258d05a3dea9f18a94 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 1 Jan 2023 11:21:05 +0100 Subject: [PATCH] EEschema, Error/Info messages: do not add the unit id to single unit symbol ref --- eeschema/component_references_lister.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eeschema/component_references_lister.cpp b/eeschema/component_references_lister.cpp index e4d06fb31c..e875038fba 100644 --- a/eeschema/component_references_lister.cpp +++ b/eeschema/component_references_lister.cpp @@ -682,7 +682,8 @@ int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler ) else tmp = wxT( "?" ); - if( ( m_flatList[ii].m_unit > 0 ) && ( m_flatList[ii].m_unit < 0x7FFFFFFF ) ) + if( ( m_flatList[ii].m_unit > 0 ) && ( m_flatList[ii].m_unit < 0x7FFFFFFF ) + && m_flatList[ii].GetLibPart()->GetUnitCount() > 1 ) { msg.Printf( _( "Item not annotated: %s%s (unit %d)" ), m_flatList[ii].GetRef(), @@ -751,7 +752,8 @@ int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler ) msg.Printf( _( "Duplicate items %s%s%s\n" ), first.GetRef(), tmp, - LIB_SYMBOL::SubReference( first.m_unit ) ); + first.GetLibPart()->GetUnitCount() > 1 ? + LIB_SYMBOL::SubReference( first.m_unit ) : wxT( "" ) ); aHandler( ERCE_DUPLICATE_REFERENCE, msg, &first, &m_flatList[ii+1] ); error++;