X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ca6a5f04692678cd2d9f3ea0843fc3f5a0b254f..28be2e8a170979d476a5ea4f585505b8a2f5af27:/src/common/docview.cpp

diff --git a/src/common/docview.cpp b/src/common/docview.cpp
index bcb467b60e..072766bb9a 100644
--- a/src/common/docview.cpp
+++ b/src/common/docview.cpp
@@ -1657,7 +1657,7 @@ void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event))
 
 void wxDocParentFrame::OnMRUFile(wxCommandEvent& event)
 {
-    int n = event.GetSelection() - wxID_FILE1;  // the index in MRU list
+    int n = event.GetId() - wxID_FILE1;  // the index in MRU list
     wxString filename(m_docManager->GetHistoryFile(n));
     if ( !filename.IsEmpty() )
     {