From 65776a1582e9ae237fc4b5587fb72582d25c06ac Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Dec 2010 13:57:21 +0000 Subject: [PATCH] Really fix recently broken accelerators handling in menu items. As wxAcceleratorEntry::Create() now expects the full menu item label, just pass GetItemLabel() to it in wxMenuItemBase::GetAccel() instead of half- parsing it ourselves there. Closes #12794. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/menucmn.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 75ab6ef07c..4c7abae78d 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -114,9 +114,7 @@ wxMenuItemBase::~wxMenuItemBase() wxAcceleratorEntry *wxMenuItemBase::GetAccel() const { - const wxString accel = GetItemLabel().AfterFirst(wxT('\t')); - - return accel.empty() ? NULL : wxAcceleratorEntry::Create(accel); + return wxAcceleratorEntry::Create(GetItemLabel()); } void wxMenuItemBase::SetAccel(wxAcceleratorEntry *accel) -- 2.47.2