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
This commit is contained in:
Vadim Zeitlin
2000-06-22 08:04:54 +00:00
parent 00ce683fb0
commit 9393e156ef

View File

@@ -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 )