Don't use SI prefixes with degrees when auto-ranging.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
(cherry picked from commit 5a3bad51d0
)
This commit is contained in:
parent
4d0ca33b47
commit
a8b127019c
|
@ -225,8 +225,16 @@ wxString SPICE_VALUE::ToString( const SPICE_VALUE_FORMAT& aFormat )
|
||||||
|
|
||||||
if( range.StartsWith( wxS( "~" ) ) )
|
if( range.StartsWith( wxS( "~" ) ) )
|
||||||
{
|
{
|
||||||
Normalize();
|
// Don't use SI prefixes with degrees unless they specifically ask for it.
|
||||||
range = si_prefix( m_prefix ) + range.Right( range.Length() - 1 );
|
if( range.EndsWith( wxS( "°" ) ) )
|
||||||
|
{
|
||||||
|
range = range.Right( range.Length() - 1 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Normalize();
|
||||||
|
range = si_prefix( m_prefix ) + range.Right( range.Length() - 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue