]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
applied MIME patch(es) from Chris Elliott
[wxWidgets.git] / src / msw / listctrl.cpp
index 2180a542101d7c0a11e109dec0b485dfa997337b..2d363b6ac3f973a706833d538f694a7d6fe24bd5 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;
                 }
@@ -1664,7 +1667,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                         return TRUE;
                 }
             }
-            break;
+//            break; // can never be reached
 #endif // _WIN32_IE >= 0x300
 
         default: