From c66fe5e91e36baf4bcea0caccad8ee0981254c26 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 11 Apr 2020 20:11:29 +0100 Subject: [PATCH] Don't try to add unit designator for a component without multiple units. Fixes https://gitlab.com/kicad/code/kicad/issues/2458 --- eeschema/sch_component.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 3744d38099..5877e560b2 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -598,7 +598,7 @@ const wxString SCH_COMPONENT::GetRef( const SCH_SHEET_PATH* sheet, bool aInclude if( ref.IsEmpty() ) ref = m_prefix; - if( aIncludeUnit ) + if( aIncludeUnit && GetUnitCount() > 1 ) ref += LIB_PART::SubReference( GetUnit() ); return ref;