Skip mouse button release events in wxGenericTreeCtrl.

Not doing this prevented the default handling from taking place resulting in
internal confusion in GtkNotebook when wxTreeCtrl was placed inside it: the
code there set the button being held by user in its mouse press event handler
and reset it in its mouse release event handler which was never called because
we didn't skip the event, resulting in ignoring the next mouse press in the
notebook.

Closes #16055.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-07 13:17:21 +00:00
parent 74f21995ca
commit 687aedf1ca

View File

@@ -3696,7 +3696,9 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
#endif
}
}
else if ( (event.LeftUp() || event.RightUp()) && m_isDragging )
else if ( event.LeftUp() || event.RightUp() )
{
if ( m_isDragging )
{
ReleaseMouse();
@@ -3731,6 +3733,11 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
#endif
}
else
{
event.Skip();
}
}
else
{
// If we got to this point, we are not dragging or moving the mouse.
// Because the code in carbon/toplevel.cpp will only set focus to the