Allow closing wxAuiTabCtrl pages without switching to them.
Clicking on the page "x" close button switched to the page before doing anything else which was unusual as other tabbed controls don't behave like this. Handle clicks on the close button specially and avoid switching to the page which is about to be closed anyhow. Closes #14150. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1050,8 +1050,8 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt)
|
||||
// wxAuiNotebooks always want to receive this event
|
||||
// even if the tab is already active, because they may
|
||||
// have multiple tab controls
|
||||
if (new_selection != GetActivePage() ||
|
||||
GetParent()->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
||||
if ((new_selection != GetActivePage() ||
|
||||
GetParent()->IsKindOf(CLASSINFO(wxAuiNotebook))) && !m_hoverButton)
|
||||
{
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId);
|
||||
e.SetSelection(new_selection);
|
||||
|
Reference in New Issue
Block a user