mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-28 15:50:17 +08:00
Ignore keys with modifiers in wxNumValidatorBase
This allows to use accelerators, such as Alt-X, when the focus is on a
key control using numeric validator in wxGTK.
(cherry picked from commit 39045e1ce5)
This commit is contained in:
@@ -173,6 +173,13 @@ void wxNumValidatorBase::OnChar(wxKeyEvent& event)
|
||||
return;
|
||||
}
|
||||
|
||||
if ( event.GetModifiers() & ~wxMOD_SHIFT )
|
||||
{
|
||||
// Keys using modifiers other than Shift don't change the number, so
|
||||
// ignore them.
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this character is allowed in the current state.
|
||||
wxString val;
|
||||
int pos;
|
||||
|
||||
Reference in New Issue
Block a user