From: Václav Slavík Date: Wed, 1 Sep 2010 13:28:43 +0000 (+0000) Subject: Reduce flicker when removing wxNotebook page. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8138f406a26d9bbbb3d841af84af85d1d8cb5ea1?ds=inline Reduce flicker when removing wxNotebook page. wxMSW implementation hides all pages except the selected one. But when removing selected page from the control, this invariant is temporarily broken and this results in visible flicker. Hiding the page as soon as it gets removed fixes it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index b199c98ab9..90edb491b3 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -688,6 +688,10 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage) if ( !pageRemoved ) return NULL; + // hide the removed page to maintain the invariant that only the + // selected page is visible and others are hidden: + pageRemoved->Show(false); + TabCtrl_DeleteItem(GetHwnd(), nPage); if ( m_pages.IsEmpty() )