Don't use SI prefixes with degrees when auto-ranging.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
This commit is contained in:
Jeff Young 2024-06-14 15:16:11 +01:00
parent 7b63429fe1
commit 5a3bad51d0
1 changed files with 10 additions and 2 deletions

View File

@ -225,8 +225,16 @@ wxString SPICE_VALUE::ToString( const SPICE_VALUE_FORMAT& aFormat )
if( range.StartsWith( wxS( "~" ) ) )
{
Normalize();
range = si_prefix( m_prefix ) + range.Right( range.Length() - 1 );
// Don't use SI prefixes with degrees unless they specifically ask for it.
if( range.EndsWith( wxS( "°" ) ) )
{
range = range.Right( range.Length() - 1 );
}
else
{
Normalize();
range = si_prefix( m_prefix ) + range.Right( range.Length() - 1 );
}
}
else
{