From acff8466a7993dcf998105c54e39e617194e43a5 Mon Sep 17 00:00:00 2001 From: Kvaz1r Date: Mon, 24 Feb 2020 15:59:49 +0200 Subject: [PATCH] Hide page removed from wxAuiNotebook It doesn't make sense to leave the page shown, and overlapping the remaining pages, after removing it. Closes https://github.com/wxWidgets/wxWidgets/pull/1742 --- docs/changes.txt | 3 +++ src/aui/auibook.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 8925b02258..0a3166c432 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -90,6 +90,9 @@ Changes in behaviour not resulting in compilation errors - wxListCtrl::GetItemState() in wxMSW now checks the passed in item index for validity, as the generic version under the other platforms already did. +- wxAuiNotebook::RemovePage() now hides the removed page, so it needs to be + shown again if it is reused in another place. + Changes in behaviour which may result in build errors ----------------------------------------------------- diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 687b4213ee..c980178afa 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -2082,6 +2082,8 @@ bool wxAuiNotebook::RemovePage(size_t page_idx) if (!wnd) return false; + ShowWnd(wnd, false); + // find out which onscreen tab ctrl owns this tab wxAuiTabCtrl* ctrl; int ctrl_idx;