Follow-up f277bc80c2
- fix for value precision, when value is too small
This commit is contained in:
parent
ac2a0cddcf
commit
0146e8d863
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ wxString double_to_string(double const value, const int max_precision /*= 4*/)
|
|||
// Style_NoTrailingZeroes does not work on OSX. It also does not work correctly with some locales on Windows.
|
||||
// return wxNumberFormatter::ToString(value, max_precision, wxNumberFormatter::Style_NoTrailingZeroes);
|
||||
|
||||
wxString s = wxNumberFormatter::ToString(value, max_precision, wxNumberFormatter::Style_None);
|
||||
wxString s = wxNumberFormatter::ToString(value, value < 0.0001 ? 10 : max_precision, wxNumberFormatter::Style_None);
|
||||
|
||||
// The following code comes from wxNumberFormatter::RemoveTrailingZeroes(wxString& s)
|
||||
// with the exception that here one sets the decimal separator explicitely to dot.
|
||||
|
|
Loading…
Add table
Reference in a new issue