Don't intercept accelerators in wxTextValidator in wxGTK.
Key events with modifiers shouldn't be filtered by the validator as they are used as accelerators and not for the text entry at all. Closes #15777. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,6 +15,10 @@ 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.
|
||||
|
@@ -308,6 +308,11 @@ 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();
|
||||
|
Reference in New Issue
Block a user