]> git.saurik.com Git - wxWidgets.git/commitdiff
merged Ctrl-Space fix from 2.2 branch
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 21 Mar 2001 23:55:35 +0000 (23:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 21 Mar 2001 23:55:35 +0000 (23:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 2180a542101d7c0a11e109dec0b485dfa997337b..d8d0f17a593071f584bbc491276c6122fc01b129 100644 (file)
@@ -1489,10 +1489,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                                          wxLIST_NEXT_ALL,
                                          wxLIST_STATE_SELECTED);
 
-                // <Enter> or <Space> activate the selected item if any
-                if ( lItem != -1 && (wVKey == VK_RETURN || wVKey == VK_SPACE) )
+                // <Enter> or <Space> activate the selected item if any (but
+                // not with Shift and/or Ctrl as then they have a predefined
+                // meaning for the list view)
+                if ( lItem != -1 &&
+                     (wVKey == VK_RETURN || wVKey == VK_SPACE) &&
+                     !(wxIsShiftDown() || wxIsCtrlDown()) )
                 {
-                    // TODO this behaviour probably should be optional
                     eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED;
                     event.m_itemIndex = lItem;
                 }