git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33363
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( nMsg == WM_CONTEXTMENU )
{
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_MENU, GetId() );
- event.m_item = GetSelection();
+
+ // can't use GetSelection() here as it would assert in multiselect mode
+ event.m_item = wxTreeItemId(TreeView_GetSelection(GetHwnd()));
event.SetEventObject( this );
+
if ( GetEventHandler()->ProcessEvent(event) )
processed = true;
//else: continue with generating wxEVT_CONTEXT_MENU in base class code