add a check, make sure some action key could generate wxEVT_TEXT event. That is needed in some control, such as wxSpinCtrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-09-23 17:41:03 +00:00
parent c46487ac0f
commit 3a189686d7

View File

@ -4926,7 +4926,14 @@ bool wxStdTextCtrlInputHandler::HandleKey(wxInputConsumer *consumer,
{
consumer->PerformAction(action, -1, str);
return true;
// the key down of WXK_UP/DOWN and WXK_PAGEUP/DOWN
// must generate a wxEVT_TEXT event. For the controls
// that use wxTextCtrl, such as wxSpinCtrl
if ( (action != wxACTION_TEXT_UP) &
(action != wxACTION_TEXT_DOWN) &
(action != wxACTION_TEXT_PAGE_DOWN) &
(action != wxACTION_TEXT_PAGE_UP) )
return true;
}
return wxStdInputHandler::HandleKey(consumer, event, pressed);