From: Vadim Zeitlin Date: Sun, 25 Jul 2004 23:13:57 +0000 (+0000) Subject: detach removed submenu from the menubar too X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/082006f3abf785512850ce9c73ccf3b7edea2fb7 detach removed submenu from the menubar too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 8ab7f2b95f..45ad387456 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -385,6 +385,8 @@ wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item) if ( submenu ) { submenu->SetParent((wxMenu *)NULL); + if ( submenu->IsAttached() ) + submenu->Detach(); } return item;