handle '&' in the names of the files in the history correctly by quoting it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-07-16 23:10:46 +00:00
parent 7ae74029b8
commit 28ea89b62b

View File

@ -2165,6 +2165,8 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
pathInMenu = m_fileHistory[i];
}
// we need to quote '&' characters which are used for mnemonics
pathInMenu.Replace(_T("&"), _T("&&"));
wxString buf;
buf.Printf(s_MRUEntryFormat, i + 1, pathInMenu.c_str());
wxList::compatibility_iterator node = m_fileMenus.GetFirst();