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
This commit is contained in:
Kvaz1r
2020-02-24 15:59:49 +02:00
committed by Vadim Zeitlin
parent fce84f7bd0
commit acff8466a7
2 changed files with 5 additions and 0 deletions

View File

@@ -90,6 +90,9 @@ Changes in behaviour not resulting in compilation errors
- wxListCtrl::GetItemState() in wxMSW now checks the passed in item index for - wxListCtrl::GetItemState() in wxMSW now checks the passed in item index for
validity, as the generic version under the other platforms already did. 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 Changes in behaviour which may result in build errors
----------------------------------------------------- -----------------------------------------------------

View File

@@ -2082,6 +2082,8 @@ bool wxAuiNotebook::RemovePage(size_t page_idx)
if (!wnd) if (!wnd)
return false; return false;
ShowWnd(wnd, false);
// find out which onscreen tab ctrl owns this tab // find out which onscreen tab ctrl owns this tab
wxAuiTabCtrl* ctrl; wxAuiTabCtrl* ctrl;
int ctrl_idx; int ctrl_idx;