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

(cherry picked from commit c4ff17d3ec)
This commit is contained in:
Jeff Young 2018-10-25 23:37:00 +01:00
parent 940b08ab85
commit 187d7729ff
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(); retVal << ref << aList[ i ].GetRefNumber();
} }
else if( range == 2 )
{
retVal << ref << aList[ i ].GetRefNumber();
retVal << wxT( ", " );
retVal << ref << aList[ i + 1 ].GetRefNumber();
}
else else
{ {
retVal << ref << aList[ i ].GetRefNumber(); retVal << ref << aList[ i ].GetRefNumber();
retVal << wxT( " - " ); retVal << wxT( "-" );
retVal << ref << aList[ i + ( range - 1 ) ].GetRefNumber(); retVal << ref << aList[ i + ( range - 1 ) ].GetRefNumber();
} }