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:
@@ -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");
|
||||
|
Reference in New Issue
Block a user