Update new page in AUI tab control after removing the active one

Previously this was only done when removing the global (i.e. per
notebook) current page, but not when removing the page which was current
in this tab control without being globally current, and this resulted in
not showing the newly shown page correctly.

Fix this by explicitly updating the tab control in this case.

Closes #24063.
This commit is contained in:
Vadim Zeitlin 2024-01-03 18:58:23 +01:00
parent 586e1b1d48
commit b66d0a640d

View file

@ -2136,6 +2136,16 @@ bool wxAuiNotebook::RemovePage(size_t page_idx)
{
new_active = ctrl->GetWindowFromIdx(ctrl_idx);
}
else // not deleting the globally active page
{
// so don't change the current one
new_active = active_wnd;
// but we still need to show the new active page in this
// control, otherwise it wouldn't be updated
ctrl->DoShowHide();
ctrl->MakeTabVisible(ctrl_idx, ctrl);
}
}
}
else