Only show the context menu if the event belongs to this window

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-27 08:22:30 +00:00
parent b34dfc2e86
commit 76804be10e

View File

@@ -2496,8 +2496,14 @@ void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
event.Enable(GetLastPosition() > 0);
}
void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& WXUNUSED(event))
void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& event)
{
if (event.GetEventObject() != this)
{
event.Skip();
return;
}
if (!m_contextMenu)
{
m_contextMenu = new wxMenu;