From 667d0fb4a679018cad59cb8ba44e3ff2fb085cd3 Mon Sep 17 00:00:00 2001 From: Benjamin Williams Date: Wed, 27 Jun 2007 12:35:27 +0000 Subject: [PATCH] in wxAuiNotebook, code to reduce flicker on page close git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibook.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 61930c2575..8f809eb1d3 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -2645,7 +2645,14 @@ bool wxAuiNotebook::InsertPage(size_t page_idx, // and destroys the window as well bool wxAuiNotebook::DeletePage(size_t page_idx) { + if (page_idx >= m_tabs.GetPageCount()) + return false; + wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx); + + // hide the window in advance, as this will + // prevent flicker + ShowWnd(wnd, false); if (!RemovePage(page_idx)) return false;