Correct the check for MRU menu items range.
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
This commit is contained in:
@@ -1087,7 +1087,7 @@ void wxDocManager::OnMRUFile(wxCommandEvent& event)
|
||||
// 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user