From 4e438763a361f5b228dead1f1fbb56559a22932a Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Fri, 12 Mar 2021 20:42:39 +0100 Subject: [PATCH] Use the same StringFromValue() formatting in Eeschema as in other tools --- common/base_units.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/common/base_units.cpp b/common/base_units.cpp index f3828ee07e..a377be0ca1 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -242,14 +242,6 @@ wxString StringFromValue( EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, } -#if defined( EESCHEMA ) - wxString stringValue = wxString::Format( wxT( "%.3f" ), value_to_print ); - - // Strip trailing zeros. However, keep at least 3 digits in mantissa for readability. - StripTrailingZeros( stringValue, 3 ); - -#else - char buf[50]; int len; @@ -275,8 +267,6 @@ wxString StringFromValue( EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, wxString stringValue( buf, wxConvUTF8 ); -#endif - if( aAddUnitSymbol ) { switch( aUnits )