]> git.saurik.com Git - wxWidgets.git/commitdiff
Set all event fields correctly for drag events in generic wxListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Jan 2012 13:37:14 +0000 (13:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Jan 2012 13:37:14 +0000 (13:37 +0000)
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

src/generic/listctrl.cpp

index f95abdb06f02fd967c5860e19cb8dd21d1a34731..4fd503c7ce342643d189ceba518bbebcc420905d 100644 (file)
@@ -2412,12 +2412,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         int command = event.RightIsDown() ? wxEVT_COMMAND_LIST_BEGIN_RDRAG
                                           : wxEVT_COMMAND_LIST_BEGIN_DRAG;
 
         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;
     }
 
         return;
     }