From c612bbeca671024a15414c1dc359641c0155c95d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 20 Jan 2012 12:35:14 +0000 Subject: [PATCH] Reset next wxMenu event handler in wxUniv when detaching it from wxMenuBar. A detached menu must not send its events to the menu bar that it isn't part of any longer. Closes #2620. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/menu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 15a7adb837..957fb39972 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -1207,6 +1207,10 @@ void wxMenu::Attach(wxMenuBarBase *menubar) void wxMenu::Detach() { + // After the menu is detached from the menu bar, it shouldn't send its + // events to it. + SetNextHandler(NULL); + wxMenuBase::Detach(); } -- 2.47.2