The last id of the range if offset by the first one by the number of items in
the menu, not the base id of the file history menu.
Closes #12141.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65128
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Check if the id is in the range assigned to MRU list entries.
const int id = event.GetId();
if ( id >= wxID_FILE1 &&
- id < wxID_FILE1 + m_fileHistory->GetBaseId() )
+ id < wxID_FILE1 + static_cast<int>(m_fileHistory->GetCount()) )
{
DoOpenMRUFile(id - wxID_FILE1);
}