From 9aeee9e8fde1909cde5edaa7c74547dddc70ca9c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 24 Sep 2007 18:18:48 +0000 Subject: [PATCH] Avoid double deletion of notebook page windows, don't call DestroyChildren in ~wxAuiMDIClientWindow. Also skip the hide page optimization when destroying the notebook. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibook.cpp | 3 ++- src/aui/tabmdi.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index fd47ea1b14..96f9b24b23 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -3259,7 +3259,8 @@ bool wxAuiNotebook::DeletePage(size_t page_idx) // hide the window in advance, as this will // prevent flicker - ShowWnd(wnd, false); + if ( !IsBeingDeleted() ) + ShowWnd(wnd, false); if (!RemovePage(page_idx)) return false; diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index 853b5ae72b..82d199e645 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -716,7 +716,6 @@ wxAuiMDIClientWindow::wxAuiMDIClientWindow(wxAuiMDIParentFrame* parent, long sty wxAuiMDIClientWindow::~wxAuiMDIClientWindow() { - DestroyChildren(); } bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style)