git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66367
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
/** Standardized double-to-string conversion.
*/
/** Standardized double-to-string conversion.
*/
- static void DoubleToString( wxString& target,
- double value,
- int precision,
- bool removeZeroes,
- wxString* precTemplate );
+ static const wxString& DoubleToString( wxString& target,
+ double value,
+ int precision,
+ bool removeZeroes,
+ wxString* precTemplate = NULL );
/**
Call this from wxPGProperty::OnEvent() to cause property value to be
/**
Call this from wxPGProperty::OnEvent() to cause property value to be
// This helper method provides standard way for floating point-using
// properties to convert values to string.
// This helper method provides standard way for floating point-using
// properties to convert values to string.
-void wxPropertyGrid::DoubleToString(wxString& target,
- double value,
- int precision,
- bool removeZeroes,
- wxString* precTemplate)
+const wxString& wxPropertyGrid::DoubleToString(wxString& target,
+ double value,
+ int precision,
+ bool removeZeroes,
+ wxString* precTemplate)
{
if ( precision >= 0 )
{
{
if ( precision >= 0 )
{
for ( ; i != target.end(); i++ )
{
for ( ; i != target.end(); i++ )
{
- if ( *i != wxS('0') && *i != wxS('.') )
+ if ( *i != wxS('0') && *i != wxS('.') && *i != wxS(',') )
if ( isZero )
target.erase(target.begin());
}
if ( isZero )
target.erase(target.begin());
}
}
wxString wxFloatProperty::ValueToString( wxVariant& value,
}
wxString wxFloatProperty::ValueToString( wxVariant& value,