oops... wrong patch, second try

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-04-02 12:25:51 +00:00
parent 42191a1dbf
commit 0326c494a9

View File

@ -2488,13 +2488,26 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
m_lastOnSame = FALSE;
}
}
else
else // !RightDown() && !LeftUp() ==> LeftDown() || LeftDClick()
{
if ( event.LeftDown() )
{
m_lastOnSame = item == m_current;
}
if ( flags & wxTREE_HITTEST_ONITEMBUTTON )
{
// only toggle the item for a single click, double click on
// the button doesn't do anything (it toggles the item twice)
if ( event.LeftDown() )
{
Toggle( item );
}
// don't select the item if the button was clicked
return;
}
// how should the selection work for this event?
bool is_multiple, extended_select, unselect_others;
EventFlagsToSelType(GetWindowStyleFlag(),