Don't go to '-' numbering till the range reaches 3.

This commit is contained in:
Jeff Young 2018-10-25 23:37:00 +01:00
parent d953724365
commit c4ff17d3ec
1 changed files with 7 additions and 1 deletions

View File

@ -838,10 +838,16 @@ wxString SCH_REFERENCE_LIST::Shorthand( std::vector<SCH_REFERENCE> aList )
{
retVal << ref << aList[ i ].GetRefNumber();
}
else if( range == 2 )
{
retVal << ref << aList[ i ].GetRefNumber();
retVal << wxT( ", " );
retVal << ref << aList[ i + 1 ].GetRefNumber();
}
else
{
retVal << ref << aList[ i ].GetRefNumber();
retVal << wxT( " - " );
retVal << wxT( "-" );
retVal << ref << aList[ i + ( range - 1 ) ].GetRefNumber();
}