From 9393e156ef1c2567069ff991453d4fd741661233 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 22 Jun 2000 08:04:54 +0000 Subject: [PATCH] fix for branch 'auto-collapse' git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectrl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index c64fc38faf..24be5cdf92 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -2193,8 +2193,6 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) int flags = 0; wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags); - bool onButton = flags & wxTREE_HITTEST_ONITEMBUTTON; - if ( event.Dragging() && !m_isDragging ) { if (m_dragCount == 0) @@ -2330,7 +2328,7 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) event.ControlDown(), is_multiple, extended_select, unselect_others); - if ( onButton ) + if ( (flags & wxTREE_HITTEST_ONITEMBUTTON) && event.LeftDown() ) { Toggle( item ); if ( is_multiple )