Generate wxEVT_CONTEXT_MENU everywhere in generic wxTreeCtrl

Clicking outside of the items area didn't generate wxEVT_CONTEXT_MENU in
the generic version, unlike the native MSW one and contrary to
expectations.

Also update the documentation to make it clear when exactly are
wxEVT_TREE_ITEM_MENU and wxEVT_CONTEXT_MENU events generated.

Closes #17361.
This commit is contained in:
Vadim Zeitlin 2018-01-30 23:34:33 +01:00
parent 96d9f7361b
commit caea08e6b2

View File

@ -3743,7 +3743,11 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
m_dragCount = 0;
if (item == NULL) return; /* we hit the blank area */
if ( item == NULL )
{
event.Skip();
return;
}
if ( event.RightDown() )
{