From e3f89fae8d582e1b2983593cddb08bb14db62a41 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Nov 2013 13:57:20 +0000 Subject: [PATCH] Fix menu item destruction broken by r75250. The menu items were not removed from the menu any longer when they were deleted or destroyed after the changes in this revision. Fix this by calling the public Remove(), which does the right thing, instead of the private DoRemove(), which only does part of the job of removing the item, in DoDelete() and DoDestroy(). See #3424. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/menucmn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 713d314a9d..f9091bd7af 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -458,7 +458,7 @@ bool wxMenuBase::Delete(wxMenuItem *item) bool wxMenuBase::DoDelete(wxMenuItem *item) { - wxMenuItem *item2 = DoRemove(item); + wxMenuItem *item2 = Remove(item); wxCHECK_MSG( item2, false, wxT("failed to delete menu item") ); // don't delete the submenu @@ -478,7 +478,7 @@ bool wxMenuBase::Destroy(wxMenuItem *item) bool wxMenuBase::DoDestroy(wxMenuItem *item) { - wxMenuItem *item2 = DoRemove(item); + wxMenuItem *item2 = Remove(item); wxCHECK_MSG( item2, false, wxT("failed to delete menu item") ); delete item2;