X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d1af991f497a5e95d8f8ab15a4e4a4a4c375928f..678cd6de66095373ebaed01d8d013f256cac326b:/src/common/valtext.cpp diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index f891889826..9fdf5b77e7 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -281,7 +281,7 @@ void wxTextValidator::OnChar(wxKeyEvent& event) ((m_validatorStyle & wxFILTER_ALPHA) && !isalpha(keyCode)) || ((m_validatorStyle & wxFILTER_ALPHANUMERIC) && !isalnum(keyCode)) || ((m_validatorStyle & wxFILTER_NUMERIC) && !isdigit(keyCode) - && keyCode != '.' && keyCode != '-') + && keyCode != '.' && keyCode != ',' && keyCode != '-') ) ) { @@ -301,7 +301,9 @@ static bool wxIsNumeric(const wxString& val) int i; for ( i = 0; i < (int)val.Length(); i++) { - if ((!isdigit(val[i])) && (val[i] != '.')) + // Allow for "," (French) as well as "." -- in future we should + // use wxSystemSettings or other to do better localisation + if ((!isdigit(val[i])) && (val[i] != '.') && (val[i] != ',')) if(!((i == 0) && (val[i] == '-'))) return FALSE; } @@ -310,4 +312,3 @@ static bool wxIsNumeric(const wxString& val) #endif // wxUSE_VALIDATORS - \ No newline at end of file