diff --git a/eeschema/component_references_lister.cpp b/eeschema/component_references_lister.cpp index 619de2769a..0cb35c9307 100644 --- a/eeschema/component_references_lister.cpp +++ b/eeschema/component_references_lister.cpp @@ -438,6 +438,9 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId ) if( componentFlatList[jj].CompareValue( componentFlatList[ii] ) != 0 ) continue; + if( componentFlatList[jj].CompareLibName( componentFlatList[ii] ) != 0 ) + continue; + if( !componentFlatList[jj].m_IsNew ) continue; diff --git a/eeschema/netlist.h b/eeschema/netlist.h index 848086cd89..6c30323e3e 100644 --- a/eeschema/netlist.h +++ b/eeschema/netlist.h @@ -36,6 +36,7 @@ #include "class_libentry.h" #include "sch_sheet_path.h" +#include "sch_component.h" class SCH_COMPONENT; @@ -154,6 +155,11 @@ public: return m_Ref.compare( item.m_Ref ); } + int CompareLibName( const SCH_REFERENCE& item ) const + { + return m_RootCmp->GetLibName().CmpNoCase( item.m_RootCmp->GetLibName() ); + } + bool IsPartsLocked() { return m_Entry->UnitsLocked();