From: Vadim Zeitlin Date: Mon, 16 Jan 2012 13:37:14 +0000 (+0000) Subject: Set all event fields correctly for drag events in generic wxListCtrl. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/14841e5a8eb6c00107b9c5ad38c1c461a422efe4 Set all event fields correctly for drag events in generic wxListCtrl. Call SendNotify() instead of (ponly partially) duplicating it in the code generating wxEVT_COMMAND_LIST_BEGIN_[R]DRAG. Closes #1582. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index f95abdb06f..4fd503c7ce 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2412,12 +2412,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) int command = event.RightIsDown() ? wxEVT_COMMAND_LIST_BEGIN_RDRAG : wxEVT_COMMAND_LIST_BEGIN_DRAG; - wxListEvent le( command, GetParent()->GetId() ); - le.SetEventObject( GetParent() ); - le.m_item.m_itemId = - le.m_itemIndex = m_lineLastClicked; - le.m_pointDrag = m_dragStart; - GetParent()->GetEventHandler()->ProcessEvent( le ); + SendNotify( m_lineLastClicked, command, m_dragStart ); return; }