Fix tree control invalid pointer after drag bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2510,6 +2510,13 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
// erase the highlighting
|
||||
DrawDropEffect(m_dropTarget);
|
||||
|
||||
if ( m_oldSelection )
|
||||
{
|
||||
m_oldSelection->SetHilight(TRUE);
|
||||
RefreshLine(m_oldSelection);
|
||||
m_oldSelection = (wxGenericTreeItem *)NULL;
|
||||
}
|
||||
|
||||
// generate the drag end event
|
||||
wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG, GetId());
|
||||
|
||||
@@ -2522,13 +2529,6 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
m_isDragging = FALSE;
|
||||
m_dropTarget = (wxGenericTreeItem *)NULL;
|
||||
|
||||
if ( m_oldSelection )
|
||||
{
|
||||
m_oldSelection->SetHilight(TRUE);
|
||||
RefreshLine(m_oldSelection);
|
||||
m_oldSelection = (wxGenericTreeItem *)NULL;
|
||||
}
|
||||
|
||||
ReleaseMouse();
|
||||
|
||||
SetCursor(m_oldCursor);
|
||||
|
Reference in New Issue
Block a user