mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
More discriminatory test for 2-1/2 digits after decimal.
This commit is contained in:
parent
34e075e112
commit
918f0ec6af
@ -462,9 +462,10 @@ wxString EDA_UNIT_UTILS::UI::MessageTextFromValue( const EDA_IU_SCALE& aIuScale,
|
||||
if( short_form && aUnits == EDA_UNITS::MM )
|
||||
{
|
||||
struct lconv* lc = localeconv();
|
||||
int length = (int) text.Length();
|
||||
|
||||
if( text.Contains( *lc->decimal_point ) && text.EndsWith( '0' ) )
|
||||
text = text.Left( text.size() - 1 );
|
||||
if( length > 4 && text[length - 4] == *lc->decimal_point && text[length - 1] == '0' )
|
||||
text = text.Left( length - 1 );
|
||||
}
|
||||
|
||||
if( aAddUnitsText )
|
||||
|
Loading…
x
Reference in New Issue
Block a user