Increase precision for doubles/string conversion

Required so that the Select: command has reasonable precision
on tracks longer than 17 minutes.
This commit is contained in:
Steve Daulton 2018-10-23 19:55:15 +01:00
parent df3c2a7b2f
commit d716b61b1e
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ public:
virtual bool DoWriteDouble(const wxString & key, double value) override
{
return DoWriteString(key, wxString::Format(wxT("%g"), value));
return DoWriteString(key, wxString::Format(wxT("%.8g"), value));
}
bool ReadFloat(const wxString & key, float *pf) const

View File

@ -114,7 +114,7 @@ wxString WrappedType::ReadAsString()
return wxString::Format(wxT("%i"),*mpInt );
break;
case eWrappedDouble:
return wxString::Format(wxT("%g"),*mpDouble );
return wxString::Format(wxT("%.8g"),*mpDouble );
break;
case eWrappedBool:
return (* mpBool) ? wxT("true") : wxT("false" );
@ -272,7 +272,7 @@ void WrappedType::WriteToAsDouble( const double InDouble)
switch( eWrappedType )
{
case eWrappedString:
*mpStr = wxString::Format( wxT("%g"), InDouble );
*mpStr = wxString::Format( wxT("%.8g"), InDouble );
break;
case eWrappedInt:
*mpInt = (int)InDouble;