X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b4e4c3937371a1404c0847b3e355a2dd6063d6b..46405e36bf9962b251e77e5048e96bf6a54edb15:/src/propgrid/props.cpp diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 27cb584949..f8357d4408 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -666,11 +666,11 @@ wxFloatProperty::~wxFloatProperty() { } // 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 ) { @@ -722,7 +722,7 @@ void wxPropertyGrid::DoubleToString(wxString& target, for ( ; i != target.end(); i++ ) { - if ( *i != wxS('0') && *i != wxS('.') ) + if ( *i != wxS('0') && *i != wxS('.') && *i != wxS(',') ) { isZero = false; break; @@ -732,6 +732,8 @@ void wxPropertyGrid::DoubleToString(wxString& target, if ( isZero ) target.erase(target.begin()); } + + return target; } wxString wxFloatProperty::ValueToString( wxVariant& value,