if ( GetChildCount() && HasFlag(wxPG_PROP_COMPOSED_VALUE) )
{
// Value stored in m_value is non-editable, non-full value
- if ( (argFlags & wxPG_FULL_VALUE) || (argFlags & wxPG_EDITABLE_VALUE) )
+ if ( (argFlags & wxPG_FULL_VALUE) ||
+ (argFlags & wxPG_EDITABLE_VALUE) ||
+ !s.length() )
{
// Calling this under incorrect conditions will fail
wxASSERT_MSG( argFlags & wxPG_VALUE_IS_CURRENT,
{
arr.Add(wxS("+"));
arr.Add(wxS("-"));
- arr.Add(wxS("."));
arr.Add(wxS("e"));
+
+ // Use locale-specific decimal point
+ arr.Add(wxString::Format("%g", 1.1)[1]);
}
SetIncludes(arr);
// 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,