Only show the context menu if the event belongs to this window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
429e2bb2fa
commit
b4ae0def64
@ -2527,8 +2527,14 @@ void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
|
|||||||
event.Enable(GetLastPosition() > 0);
|
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)
|
if (!m_contextMenu)
|
||||||
{
|
{
|
||||||
m_contextMenu = new wxMenu;
|
m_contextMenu = new wxMenu;
|
||||||
|
Loading…
Reference in New Issue
Block a user