diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 59a0f34bc7..73cea44d66 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -4257,7 +4257,7 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt) { // if the close button is to the right, use the active // page selection to determine which page to close - selection = GetSelection(); + selection = tabs->GetActivePage(); } if (selection != -1)