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/branches/WX_3_0_BRANCH@76093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-07 13:16:15 +00:00
parent bd2ae0a988
commit cd004895c4
2 changed files with 30 additions and 22 deletions

View File

@@ -612,6 +612,7 @@ wxGTK:
- Fix wxStaticBoxSizer size calculation.
- Fix AUI panel re-docking.
- Add support for wxDD_DIR_MUST_EXIST to wxDirDialog.
- Fix disappearing mouse clicks when using wxTreeCtrl.
wxMSW:

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