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:
parent
df3c2a7b2f
commit
d716b61b1e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user