From 7b7f3b0132df8b755baba575bdc690751c5c8a63 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 3 Jan 2014 01:34:05 +0000 Subject: [PATCH] Revert "Don't intercept accelerators in wxTextValidator in wxGTK." Testing for absence of Alt modifier is wrong as it could be specified for the events generated by AltGr-letter key combinations (AltGr is Alt+Ctrl), so this commit broke the validation of any such symbols entered from non-US keyboard. This is worse than the problem it was trying to fix, so revert this for now. The real fix will need to ensure that the mnemonics are checked first, i.e. before generating EVT_CHAR, in wxGTK, just as it already happens in wxMSW. This reverts r75453. See #15777. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ---- src/common/valtext.cpp | 5 ----- 2 files changed, 9 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index fc5e453a7d..2a3f80a0d7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -19,10 +19,6 @@ All (GUI): - Add wxHtmlWindow::SetDefaultHTMLCursor() (Jeff A. Marr). - Add default ctor and Create() to wxContextHelpButton (Hanmac). -wxGTK: - -- Don't intercept accelerators in wxTextValidator. - wxMSW: - Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable. diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 717902d269..70bf904009 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -308,11 +308,6 @@ void wxTextValidator::OnChar(wxKeyEvent& event) if (!m_validatorWindow) return; - // Don't process the accelerators, i.e. any keys with any modifiers except - // for Shift. - if ( event.GetModifiers() & ~wxMOD_SHIFT ) - return; - #if wxUSE_UNICODE // We only filter normal, printable characters. int keyCode = event.GetUnicodeKey();