Don't try to add unit designator for a component without multiple units.

Fixes https://gitlab.com/kicad/code/kicad/issues/2458
This commit is contained in:
Jeff Young 2020-04-11 20:11:29 +01:00
parent 48a0f25ce6
commit c66fe5e91e
1 changed files with 1 additions and 1 deletions

View File

@ -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;