]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Applied patch from Bo, WIP
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index bf06f72f309d7581073f5482dfd17ca1458709ad..caf9d338d8e22ded01711e4444966ed49be9c582 100644 (file)
@@ -2527,8 +2527,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;