]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/props.cpp
Store menus titles in menus themselves in wxOSX.
[wxWidgets.git] / src / propgrid / props.cpp
index 27cb58494921d601ba453f063ef05b9e768c3001..f8357d44080a76d27d6f79bc157ae486623f1625 100644 (file)
@@ -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,