From 7db91489d6b52bee2d7dce74ef0a81b657c9eec6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 9 Jul 2001 22:03:55 +0000 Subject: [PATCH] set m_itemIndex in the list events for key down event too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index be0c0bbef8..d5bd89601f 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1498,7 +1498,6 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) !(wxIsShiftDown() || wxIsCtrlDown()) ) { eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; - event.m_itemIndex = lItem; } else { @@ -1506,6 +1505,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.m_code = wxCharCodeMSWToWX(wVKey); } + event.m_itemIndex = + event.m_item.m_itemId = lItem; + if ( lItem != -1 ) { // fill the other fields too -- 2.45.2