Merge remote-tracking branch 'sunset/process-enter'

Fix wxTE_PROCESS_ENTER logic for wxMSW and wxGTK too.

See https://github.com/wxWidgets/wxWidgets/pull/1415

Closes #18273.
This commit is contained in:
Vadim Zeitlin
2019-07-26 18:02:08 +02:00
14 changed files with 260 additions and 27 deletions

View File

@@ -1728,6 +1728,12 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
event.SetString(GetValue());
if ( HandleWindowEvent(event) )
return;
// We disable built-in default button activation when
// wxTE_PROCESS_ENTER is used, but we still should activate it
// if the event wasn't handled, so do it from here.
if ( ClickDefaultButtonIfPossible() )
return;
}
}