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:
@@ -3743,7 +3743,11 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
|||||||
|
|
||||||
m_dragCount = 0;
|
m_dragCount = 0;
|
||||||
|
|
||||||
if (item == NULL) return; /* we hit the blank area */
|
if ( item == NULL )
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( event.RightDown() )
|
if ( event.RightDown() )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user