X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/675a9c0de58fcbe045a22b2d00a0b6c3c4f6da14..5147354ced015fb79d5dfd54546396bf670b4dd0:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 81f8324414..0f624d2e6d 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -1092,8 +1092,12 @@ void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event) tmpbuf[0] = (char) keycode; tmpbuf[1] = '\0'; wxString strbuf(tmpbuf, *wxConvCurrent); +#if wxUSE_INTL bool is_decimal_point = ( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) ); +#else + bool is_decimal_point = ( strbuf == _T(".") ); +#endif if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-' || is_decimal_point ) { @@ -1166,9 +1170,13 @@ bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event) tmpbuf[0] = (char) keycode; tmpbuf[1] = '\0'; wxString strbuf(tmpbuf, *wxConvCurrent); +#if wxUSE_INTL bool is_decimal_point = ( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) ); +#else + bool is_decimal_point = ( strbuf == _T(".") ); +#endif if ( (keycode < 128) && (wxIsdigit(keycode) || tolower(keycode) == 'e' || is_decimal_point || keycode == '+' || keycode == '-') )