Fix wxMenu::GetTitle() before the menu is appended to the menu bar.

The mnemonics conversion was not done correctly when the menu title contained
them but the menu hadn't been appended to the menu bar yet.

Closes #15461.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-08-30 23:32:37 +00:00
parent 45d66f592c
commit 69384772ac
4 changed files with 19 additions and 7 deletions

View File

@@ -150,6 +150,10 @@ void MenuTestCase::CreateFrame()
subMenu->AppendSubMenu(subsubMenu, "Subsubmen&u", "Test a subsubmenu");
// Check GetTitle() returns the correct string _before_ appending to the bar
fileMenu->SetTitle("&Foo\tCtrl-F");
CPPUNIT_ASSERT_EQUAL( "&Foo\tCtrl-F", fileMenu->GetTitle() );
PopulateMenu(fileMenu, "Filemenu item ", itemcount);
fileMenu->Append(MenuTestCase_Foo, "&Foo\tCtrl-F", "Test item to be found");