#15777: Validator disables the mnemonic letter of dialog buttons in wxGTK
-----------------------------+-----------------------------
Reporter: jbbbms | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxGTK | Version: 3.0.0
Resolution: port to stable | Keywords: wxTextValidator
Blocked By: | Blocking:
Patch: 0 |
-----------------------------+-----------------------------
Changes (by AliKet):
* cc: aliket1435@… (added)
Comment:
Unless i am missing something obvious here, a slightly modified version of
yours:
{{{
if (!m_validatorWindow)
return;
// Don't process the accelerators, i.e. any keys with any modifiers
except
// for Shift and AltGr.
if ( event.GetModifiers() & ~wxMOD_SHIFT )
{
if ( !(event.ControlDown() && event.AltDown()) )
return;
}
#if wxUSE_UNICODE
// We only filter normal, printable characters.
int keyCode = event.GetUnicodeKey();
}}}
is a reasonable fix for this bug IMO ?
for both `wxTextValidator::OnChar()` and `wxNumValidatorBase::OnChar()`
tested and working for me.
Regards,
AliKet
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/15777#comment:8>