diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 1c8379e903..2c659fdd0f 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -4374,7 +4374,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)