From ef87bd2ccc7e401f48250f22dec602a30ab30ff9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Jun 2008 01:49:44 +0000 Subject: [PATCH] don't activate items on Alt-Space or Alt-Enter (#9615) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index edb0f4923c..292bb286ff 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -2140,11 +2140,12 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxLIST_STATE_SELECTED); // or activate the selected item if any (but - // not with Shift and/or Ctrl as then they have a predefined - // meaning for the list view) + // not with modified keys pressed as they have a predefined + // meaning for the list view then) if ( lItem != -1 && (wVKey == VK_RETURN || wVKey == VK_SPACE) && - !(wxIsShiftDown() || wxIsCtrlDown()) ) + !(wxIsShiftDown() || wxIsCtrlDown() || + (GetKeyState(VK_MENU) < 0)) ) { eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; }