// 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 )
{
for ( ; i != target.end(); i++ )
{
- if ( *i != wxS('0') && *i != wxS('.') )
+ if ( *i != wxS('0') && *i != wxS('.') && *i != wxS(',') )
{
isZero = false;
break;
if ( isZero )
target.erase(target.begin());
}
+
+ return target;
}
wxString wxFloatProperty::ValueToString( wxVariant& value,