no real changes, just some cleanup: add wxIsAltDown() in addition to the existing wxIsShift/CtrlDown() and wxIsAnyModifiedDown() to test for all of them at once (slightly modified patch 1833235)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1806,17 +1806,14 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
|
||||
{
|
||||
if ( msg->message == WM_KEYDOWN )
|
||||
{
|
||||
if ( msg->wParam == VK_RETURN )
|
||||
// Only eat VK_RETURN if not being used by the application in
|
||||
// conjunction with modifiers
|
||||
if ( msg->wParam == VK_RETURN && !wxIsAnyModifierDown() )
|
||||
{
|
||||
// We need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
|
||||
// but only if none of the modifiers is down. We'll let normal
|
||||
// accelerators handle those.
|
||||
if ( !wxIsCtrlDown() && !wxIsCtrlDown() &&
|
||||
!((HIWORD(msg->lParam) & KF_ALTDOWN) == KF_ALTDOWN))
|
||||
// we need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return wxControl::MSWShouldPreProcessMessage(msg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user